2. issue : in a project within a set breakpoints , the breakpoints when debugging invalid ---- that is, the program will run directly to the end.
eclipse workspace has several projects , but only in a project breakpoint is invalid, in other projects within the breakpoint is valid.
To test , I deliberately created a debugtest.java file. Code is as follows :
public class DebugTest {
public static void main(String[] args) {
System.out.println("a");
System.out.println("b");
}
}
screenshot below :
where I was two system.out.println set up two breakpoints , then the files are placed in the same workspace in different projects , one project can be automatically stopped at a breakpoint , and the other one directly to the end of the run .
3. measures have been taken :
1. the project ( all maven project ) delete and re- import. Invalid.
2. choose Skip All Breakpoints, invalid ( the most widely circulated online method ) .
3. Choose Remove All Breakpoints, and then re- set breakpoints, or invalid.
heroes , have not encountered a similar situation .
------ Solution ---------------------------------------- ----
to stop running programs , press the red box. Then enter the debug debug .
------ Solution ---------------------------------------- ----
Although I rarely encountered this problem, but I have to reply to this post , the landlord , write your question fantastic,
very stackoverflow on style, with operating environment, problem description, code , screenshots , as well as their own to solve this problem
measures , CSDN ask questions of all the people you should refer to this format !
Closer to home, I used to debug breakpoint is invalid when it touched the case , my solution is to remove all breakpoints out ,
Then restart Eclipse, re- set breakpoints, debug again when it worked.
Is it possible the problem is related with a specific version of Eclipse ?
------ Solution ---------------------------------------- ----
under study .
there in the situation, if LZ several projects have the same file name , have concluded that the time will be confusion, Oh, I'm met several times.
------ For reference only -------------------------------------- -
lz the question very clearly indeed
------ For reference only ---------------------------------------
thank downstairs friends to join .
find the reasons for this problem : is not set when compiling project line number, it can not cause the debugger to locate the key is : this line number setting is for a project , rather than the entire platform, environment variables , thus giving rise to some works OK , some projects will not case . Pit father is that this problem actually does not have any tips, do not know when ticked off the .
ado , the solution is as follows:
selected works, right click -> Properties -> Java Compiler -> Classfile Generation, check on the Add line number attributes to generated class files (used ; by the debugger).
then on it.
------ For reference only -------------------------------------- -
I have met you this , this way with you to solve , thank you !
没有评论:
发表评论