Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Step Into grayed out in Debug perspective(cannot step through line by line in Java)
Step Into grayed out in Debug perspective [message #676311] Fri, 03 June 2011 15:39 Go to next message
omar mesa is currently offline omar mesaFriend
Messages: 6
Registered: June 2011
Junior Member
I clicked on the "Debug As" Java Application and opened the Debug perspective
and my step into etc. filters are grayed out.
Re: Step Into grayed out in Debug perspective [message #676316 is a reply to message #676311] Fri, 03 June 2011 16:07 Go to previous messageGo to next message
B Mayes is currently offline B MayesFriend
Messages: 7
Registered: June 2011
Junior Member
Sounds like you don't have any breakpoints set. The functions to step will only be available if code is suspended. The debugger will execute code until it hits a breakpoint or the end of the program. If you don't have any breakpoints set then it will just execute it until the end of the program.

You can set breakpoints by double-clicking on the very left edge of the editor (or right-click the left edge and hit toggle breakpoint).
Re: Step Into grayed out in Debug perspective [message #676325 is a reply to message #676316] Fri, 03 June 2011 17:04 Go to previous messageGo to next message
omar mesa is currently offline omar mesaFriend
Messages: 6
Registered: June 2011
Junior Member
I do have breakpoints, including the one at main which I believe is standard.
Re: Step Into grayed out in Debug perspective [message #676336 is a reply to message #676325] Fri, 03 June 2011 19:06 Go to previous messageGo to next message
B Mayes is currently offline B MayesFriend
Messages: 7
Registered: June 2011
Junior Member
I just wrote a quick hello world program and when I tell it to debug the program, I don't hit any break points. It simply outputs the string and exits. I don't get any standard break point on the main method...

Did you change the breakpoints and make them conditional? Can you take a screenshot maybe to show the program with breakpoints in it?
Re: Step Into grayed out in Debug perspective [message #676339 is a reply to message #676336] Fri, 03 June 2011 19:31 Go to previous messageGo to next message
omar mesa is currently offline omar mesaFriend
Messages: 6
Registered: June 2011
Junior Member
I got screen shots, but i can't import them into this posting. Is there a way that you know of?
Re: Step Into grayed out in Debug perspective [message #676345 is a reply to message #676339] Fri, 03 June 2011 20:20 Go to previous messageGo to next message
B Mayes is currently offline B MayesFriend
Messages: 7
Registered: June 2011
Junior Member
Make sure you use the reply button and not the quick reply. You'll find the reply button on the right side of the previous post like this:

index.php/fa/2930/0/

Once you are done with that, you should get the full reply screen and click "Choose File" and once you have chosen the file, click "Upload File":

index.php/fa/2931/0/

[Updated on: Fri, 03 June 2011 20:21]

Report message to a moderator

Re: Step Into grayed out in Debug perspective [message #676351 is a reply to message #676345] Fri, 03 June 2011 20:59 Go to previous messageGo to next message
omar mesa is currently offline omar mesaFriend
Messages: 6
Registered: June 2011
Junior Member
No Message Body
Re: Step Into grayed out in Debug perspective [message #676478 is a reply to message #676345] Sat, 04 June 2011 18:54 Go to previous messageGo to next message
omar mesa is currently offline omar mesaFriend
Messages: 6
Registered: June 2011
Junior Member
thanks for the info. Here are two screens. One shows the breakpoint and the other the debug perspective.
  • Attachment: Sceen one.PNG
    (Size: 510.88KB, Downloaded 460 times)
  • Attachment: Sceen two.PNG
    (Size: 508.04KB, Downloaded 460 times)
Re: Step Into grayed out in Debug perspective [message #676786 is a reply to message #676478] Mon, 06 June 2011 14:21 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
You have to be stopped at a breakpoint in order for the step buttons to work. You don't appear to even have a process running. You need to launch your application in Debug mode to debug it.
Re: Step Into grayed out in Debug perspective [message #676807 is a reply to message #676786] Mon, 06 June 2011 15:15 Go to previous messageGo to next message
omar mesa is currently offline omar mesaFriend
Messages: 6
Registered: June 2011
Junior Member
I believe your right. I am new to this. I re-ran in Java mode and switched back to Debug and then the buttons were ok (after hitting F5).
Now the problem is that the program runs ok in Java, but when stepping through, as soon as it hits the
system out command (System.out.println("To compute the air pollution index..."); it gives me a file not found exception, however,
this simple exercise program from my Java book has no incoming file. It expects input from the user .
Re: Step Into grayed out in Debug perspective [message #677592 is a reply to message #676807] Wed, 08 June 2011 21:54 Go to previous message
B Mayes is currently offline B MayesFriend
Messages: 7
Registered: June 2011
Junior Member
omar mesa wrote on Mon, 06 June 2011 11:15
I believe your right. I am new to this. I re-ran in Java mode and switched back to Debug and then the buttons were ok (after hitting F5).
Now the problem is that the program runs ok in Java, but when stepping through, as soon as it hits the
system out command (System.out.println("To compute the air pollution index..."); it gives me a file not found exception, however,
this simple exercise program from my Java book has no incoming file. It expects input from the user .


Hmm...there is something fishy going on here but without seeing the code for the entire exercise program it's hard to say. If a file is not found then it should fail to be found regardless of whether or not you use the debugger since the code executed is the same either way.

Also, how are you launching the debugger? Again, you need to make sure you set a breakpoint by either double-clicking in the area on the left of the editor or right-click > toggle breakpoint. Here is a screenshot where you can see a breakpoint is set. I set it by double-clicking in the orange area on the left of the editor:

index.php/fa/2977/0/


Then I would just recommend you right-click on the Java file > debug as > Java application like this:

index.php/fa/2978/0/




If you know someone that can help you in person that might be easier but if not, keep posting back and I'll try to guide you through it as best I can. Hopefully the screenshots help. Smile


  • Attachment: eclipse1.png
    (Size: 13.42KB, Downloaded 3403 times)
  • Attachment: eclipse2.png
    (Size: 112.91KB, Downloaded 3607 times)
Previous Topic:ScrollBar in a Composite
Next Topic:wdt: import java application project into dynamic web project
Goto Forum:
  


Current Time: Tue Apr 23 16:26:53 GMT 2024

Powered by FUDForum. Page generated in 0.04808 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top