Solved

step-through code in Java

Posted on 2008-10-09
3
198 Views
Last Modified: 2013-11-23
I'm a .net developer and in VS one can add breakpoints to the code and step through it.  What is the equivalent of that in Java/ Eclipse?
0
Comment
Question by:newbieal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Accepted Solution

by:
manuel_m earned 450 total points
ID: 22678073
You can also add one or more breakpoints in eclipse (or netbeans). Then you have to run the program in debug mode.

Debugging with eclipse: http://www.ibm.com/developerworks/java/library/os-ecbug/
0
 
LVL 60

Assisted Solution

by:Kevin Cross
Kevin Cross earned 50 total points
ID: 22678245
In case it doesn't show this in the link, just like in Visual Studio there is a shaded, thin column on the left side of the code pane in Eclipse.  You can toggle breakpoints there in the same fashion you would in VS.

The simple way to debug from there, is to click on the bug button to execute your code versus the play button link which should prompt you to change perspectives to debug, then the above link should be good resource from there.

Hope that helps.
0
 

Expert Comment

by:farmed
ID: 22678576
Just as my ancestor said, ricktklick that shaded line. I attached a picture.

Eclipse-set-breakpoint.jpg
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question