简体   繁体   中英

Stop code execution while debugging in Eclipse without terminating the thread

Is there a way how to stop debugging when program hits the breakpoint (ie 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?

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 .

You can hit the disconnect button. See the attached image. This will continue execution and stopping debugging without stopping the server. 在此输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM