• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to debug java code  RSS feed

 
Shiny Suresh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can someone help me? How can I figure out the program flow of the classes? I submit data in a jsp, and then which methods are called in what order? How do I debug the code and figure it out?

Please help asap.

Thanks.
 
Luigi Plinge
Ranch Hand
Posts: 441
IntelliJ IDE Scala Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easy way: use an IDE like Netbeans or Eclips e, set breakpoints, and step through the code.

Messier way: put lots of System.out.println statements in your code to tell you when certain points in your code have been hit.
 
Mezan Shareef
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me understand my doubt, i would be more than happy and grateful. I would feel like i found some hidden treasure.
 
Mykhailo Kozik
Greenhorn
Posts: 16
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using Eclipse IDE, press F11, and use step execution in debug perspective.
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try it with a simple little class first.
 
Shiny Suresh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,,thanks for a very prompt response . I am using rad and this is my first Job. How do I find out which classes and methods are related to this functionality before setting the breakpoints. Please let me know. Thanks again.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!