views:

53

answers:

2

hi all,

I was wondering how should I proceed to debug while working with frameworks. Like specifically how can i tell which method is being called when a particular event happens.

thanks raja

A: 

when your framework is bundled as a jar you can attach the source in eclipse and debug it as usual via breakpoints.

Soulreaper
A: 

There are multiple ways to do this

1) Adding eclipse debug points (as described above)

2) Enable log statements. Most frameworks use logging (log4j, slf4j etc). So write a log4j.xml and create a category for "com.xxx" where all your framework classes have a package structure of com.xxx.yyy or com.xxx.aaa. Set the logging to be debug level and run the program (which uses the framework) analysing the log files should tell you

3) In eclipse if you cant run the program (so option 1 is not really possible) you can do a "Search usage" for an API to get who is using this. This option is however limited by the fact some frameworks use reflection, interfaces etc.

Calm Storm