Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop code execution while debugging in Eclipse without terminating the thread

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?

like image 988
Petr Mensik Avatar asked Jun 25 '12 13:06

Petr Mensik


2 Answers

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.

like image 134
neun24 Avatar answered Oct 11 '22 13:10

neun24


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.)

like image 20
sudocode Avatar answered Oct 11 '22 15:10

sudocode