Reputation: 27496
Is there a way how to stop debugging when program hits the breakpoint (i.e. I don't want to execute the code after it) without stopping entire application server (I am programming apps in Java, server is JBoss)?
I know only one way how to stop debug - red button with title Terminate which shuts down the server. So is there anything else?
Upvotes: 9
Views: 7928
Reputation: 1
You can use Ctrl+Shift+I and execute throw new Exception()
, it will stop the execution of the code without stopping the server.
Upvotes: 0
Reputation: 233
While debugging, context menu offers you to force a return. This instantly leaves the method and will take you back to the caller. One can also use Alt+Shift+F.
Upvotes: 8
Reputation: 16235
If you mean "I do not want the code after my breakpoint to execute", then you could use a conditional breakpoint to execute a return
from that method.
(Note that you can execute any code you like in a conditional breakpoint. It does not have to be just a condition.)
Upvotes: 2
Reputation: 3080
You can hit the disconnect button. See the attached image. This will continue execution and stopping debugging without stopping the server.
Upvotes: -1