MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to Off Topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
glynnee
Post subject: Remote Debug in eclipse  PostPosted: Sep 27, 2006 - 03:42 AM



Joined: Sep 27, 2006
Posts: 6

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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 27, 2006 - 04:20 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
glynnee
Post subject:   PostPosted: Sep 27, 2006 - 09:15 AM



Joined: Sep 27, 2006
Posts: 6

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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 27, 2006 - 05:15 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
glynnee
Post subject:   PostPosted: Sep 28, 2006 - 02:25 AM



Joined: Sep 27, 2006
Posts: 6

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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 28, 2006 - 01:49 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
glynnee
Post subject:   PostPosted: Sep 29, 2006 - 02:42 AM



Joined: Sep 27, 2006
Posts: 6

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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 29, 2006 - 04:31 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
glynnee
Post subject:   PostPosted: Oct 12, 2006 - 04:17 AM



Joined: Sep 27, 2006
Posts: 6

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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 12, 2006 - 04:16 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
glynnee
Post subject:   PostPosted: Oct 13, 2006 - 02:38 AM



Joined: Sep 27, 2006
Posts: 6

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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 14, 2006 - 03:13 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits