• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Debugging Java

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is it possible to execute a java application in debug mode , such that all the methods that get called during the course of application execution get printed out to the console.
I tried the -verbose option but this is of least help because it just prints out the class names that are getting loaded but not the stacktrace.\

In eclipse I can set the breakpoints and monitor, but what i want is that somehow I should get the complete stack trace from beginning to end displayed on the console

Thanks.
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I don't think there is any such feature.

It doesn't sound like a very good debugging approach, anyway. What are you trying to achieve? Perhaps there is a better way?
 
Saahil Bhat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, what I want is, to understand the flow of the application in terms of the classes and the methods that are involved (in one particular use case) and the sequence in which they are called.

One way is to put in hundreds of breakpoints and then monitor, but I was just thinking that there should be someway of logging the entire stack trace somewhere.
 
Saahil Bhat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to add to it, I tried out using the -XDebug and attaching an external debugger but am yet to taste success with this approach as well.
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at AspectJ. With it you can add code to be executed at the start of every method without actually rewriting anything.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic