Eclipse Unable to install breakpoint

前端 未结 5 1940
不思量自难忘°
不思量自难忘° 2021-01-05 10:14

So a couple weeks ago my Eclipse IDE no longer allowed me to remotely debug my application saying that it was unable to install breakpoints because line numbers were not be

相关标签:
5条回答
  • 2021-01-05 10:28

    This error might also be generated if your Eclipse workspace simply has some invalid (stale or corrupted) breakpoints set. In the Breakpoints view, look for breakpoints that might be set in classes that were moved or deleted, and delete them.

    0 讨论(0)
  • 2021-01-05 10:28

    The error can be caused by the source code you have in Eclipse not matching the code used to build the application you are remotely debugging. Try rebuilding and rerunning the app and refreshing the source in Eclipse.

    0 讨论(0)
  • 2021-01-05 10:35

    In order to re enable the message : Preferences => java => debug . it is at the bottom of the screen : "Warn when unable to install breakpoint du to missing line number attributes"

    For the problem about installing breakpoints, try to add a -g to your javac command line in ant (debug attribute of you compilation task, http://ant.apache.org/manual/Tasks/javac.html)

    Eventually check if you have not mapped your project on a JRE instead of a JDK in eclipse.

    0 讨论(0)
  • 2021-01-05 10:36

    I think you may want to try adding -g to the compilearg in your ant build.

    <javac sourcepath="" srcdir="${src}" destdir="${build}"
           classpath="xyz.jar" debug="on">
        <compilerarg value="-g"/>
    </javac>
    

    Also if you are unsure if break points are working just put a break point in an early point in your code that you know is getting executed. you can also add a print statement to ensure that the break point is being passed by.

    0 讨论(0)
  • 2021-01-05 10:38

    I ran into the same problem and @jondissed and @twister answers didnt help and I'm not using a custom ant task so I tried:

    • Close the WAR, EJB and EAR projects - reopen them - still error on deploy
    • Close eclipse - reopen, restart local JBoss server - still error on deploy
    • Close eclipse - reopen, restart local JBoss server - clean JBoss temp/data directories - still error on deploy
    • Undeploy app - remove breakpoints, re-add them redeploy - still an error on deploy

    What finally worked for me was

    • Undeploy the app. Remove the breakpoints. Deploy the app. Re-add the breakpoint.

    Debug now halts at breakpoint.

    Update 1 - apparently Eclipse just gets angry at times as I just fought with it for about 10 minutes when the above appeared to not be working and while it popped the error, I closed it and it still stopped at the new, single breakpoint :-/

    Update 2 - ran into the issue again, Eclipse is just being pissy about it and even update 1 doesn't fix it - it's also affecting modified code not being deployed so when Eclipse gets in it's "mood", a clean and build then full deploy of the project works O_o

    0 讨论(0)
提交回复
热议问题