简体   繁体   中英

Can't apply debug on java file in eclipse

On applying breakpoints to a java file in debug mode, the breakpoints are not stopping the control flow of that file. However, the breakpoints are stopping the control flow on another file in the same package. When i apply breakpoints on one file the break point changes to a circle with tail and the break point stops the control flow while on applying it to other file it remains a circle only and does not stop the control flow. How to get the break point to stop the control flow?

Working: 在此输入图像描述

Not working: 在此输入图像描述

Ok as you have mentioned as a reply to my comment that you are doing remote appliction debugging. So most likely the problem is that you have different version of code in your server and in your eclipse.

In short it seems that executable doesn't map their source lines all that well to the generated .java file source lines. So what looks like a source line in your real source isn't actually executable in the generated source, so it can't actually sustain a breakpoint.

Hope it helps!

请保证您的代码和服务器保持一致,否则会有这个问题。

Circle with tail : Breakpoint is successfully set because Your Source code matches with the Byte Code and debug control will reach there.

Only Circle : Source code differs from Byte code (May be you are running a older Snapshot of code). Control will never reach at this breakpoint. You will have to update your JARs to get control to these breakpoints.

Solution : In case of remote debugging this happens often, you can get your problem solved by replacing older JARs with new ones obtained after building your project.

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