facebook

Remote Debug in eclipse

  1. MyEclipse Archived
  2.  > 
  3. General
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #259313 Reply

    glynnee
    Member

    Hello!

    I am new to eclipse and I’m not familiar with it. I am having trouble using remote debug. I don’t understand why nothing happens when I press F6 or F8 after clicking on “Debug…” Hope someone can help me. Thank you.

    #259323 Reply

    Riyad Kalla
    Member

    Are you debugging a Java application, web application, etc? Also don’t forget to set breakpoints, if you don’t set any breakpoints, debugging will literally do nothing.

    #259330 Reply

    glynnee
    Member

    I am debugging a Java application. I have also set breakpoints. Sometimes remote debug will work, sometimes it will not. And even though I have modified compiler options, the message “Unable to install breakpoints due to missing line number attributes. Modify compiler options to generate line number attributes.” still appears five times! I don’t understand why it is happening at all.

    I am also using ant script. And I have added debug=”true” on <target=”compile”…> <javac …> Hope you can help me figure this out.

    #259361 Reply

    Riyad Kalla
    Member

    Ahh setting debug=true isn’t enough, you also need to set debuglevel=”lines,vars,source”, please see this for reference:
    http://ant.apache.org/manual/CoreTasks/javac.html

    #259415 Reply

    glynnee
    Member

    Ah yes setting debuglevel=”lines,vars,source” solved my problem. The message, “Unable to install breakpoints due to missing line number attributes. Modify compiler options to generate line number attributes.” will no longer appear when I run “Debug…” But still I can’t debug the java files…After I run “Debug…” it will connect to remote VM and several threads are running…but when I press F6 or F8, debug doesn’t execute. Is that suppose to happen? Please bear with me…I just don’t know what to do anymore.

    I have also tried “clean” before I run “Debug…” but it will have a message, “Errors during build.
    Errors running builder “Integrated External Tool Builder” on project ADComponent_DS.
    The builder launch configuration could not be found.” How can I resolve this problem?

    P.S. Thank you so much

    #259449 Reply

    Riyad Kalla
    Member

    Well first I would point out that unless a breakpoint has been hit, all your controls on the debug perspective will be grayed out and won’t do anything, is that what you see or are you saying *after* hitting a breakpoint, pressing those buttons do nothing? What about actually clicking the little buttons in the debug perspective (continue, step over, next line, etc?)

    Lastly, you will want to correct any build errors before running or debugging a project, build errors can lead to all sorts of issues. If you open your project properties, you can go to Builders and see what builders you have assigned to that projct, try and figure out what is going o nwith the External Tool Builder, it is most likely referencing an Ant script.

    #259524 Reply

    glynnee
    Member

    Hitting a breakpoint means it has been executed right? or it has been passed through or performed…I think a breakpoint hasn’t been hit because the controls in my debug perspective are grayed out…only the “resume”, “disconnect” and “use step filters/step debug” are not grayed out…sometimes it’s the “terminate”, disconnect” and “use step filter/step debug”…

    I checked my project properties and see the builders assigned to my project. It seems strange because “Extenal Tool Builder” is not checked on the list…I don’t understand why it has an “x” on it…yes i have an ant script, “build.xml”…I am really sorry but I’m not so familiar with this… 🙁 Please don’t get tired of helping me…Thank you.

    #259554 Reply

    Riyad Kalla
    Member

    I just thought of something, if you set a break point, for example, on the first line in your main() method, and you fire up your program, it will get hit right away. But in the debug perspective you will notice that there are multiple threads, look for the thread that is <Suspended> and select it, then the controls should enable themselves. So for example, if some running thread (like the event dispatch thread or something like that) is selected, you won’t have debug controls cause it’s not the suspended thread.

    Just a though, but I think all of this is just a case of mistaken identity.

    #260290 Reply

    glynnee
    Member

    So sorry hasn’t been able to reply…Do i need to have a main method to run remote debug? coz i don’t have a main method in my java codes since it’s a different application…hope to hear from you…thank you for your time

    #260323 Reply

    Riyad Kalla
    Member

    No I suppose not, I was just using “main” as an example.

    #260350 Reply

    glynnee
    Member

    What else do I need to set in order to Run Remote Debug aside from the project name, connection type, host and port? I have set it already but when I run Remote Debug I only see several threads running but it will not debug the java codes that I want to debug though I have set breakpoints on my code.

    #260402 Reply

    Riyad Kalla
    Member

    You have to make sure that the project you are debugging was compiled with debugging information included in the class files. By default, for example, using Ant to build your project will not do this (the javac target I don’t think includes debug info by default). That could be why none of the break points are getting hit, the debugger has no idea where you are in the program’s execution.

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Remote Debug in eclipse

You must be logged in to post in the forum log in