This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stack trace with variables and method arguments

 
Peter Kovac
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Was wondering if there is a way to create a stack trace that contains variables and method arguments for each frame - kinda like a debugger.

I just need something that can show these info - for example when an exception is thrown.

As of now I have two possible solutions: aspects but they need the proper framework and the Java Debug Interface which seems to be slow and complicated.

Are there any ways?

Thanks,
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aspects would be the way I'd choose. You don't need to worry about any framework; AspectJ is small and easy to integrate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic