When working on a big java application with many jar and legacy code you don't know, what are the techniques to identify witch code match a given functionality ?
For example, imagine that clicking a button in your application runs some java code but you don't know which jar and class are involved. The functionality is fast and you don't have enough time to press the button and break with a debugger to discover the involved code.
If it would be a C++ feature I would probably use Visual Studio diagnostic tools to identify quickly the involved code thanks to the profiling feature. Are there any similar debugging technics in Java ?
edit: In my case, the application I'm working on involve many technologies. The core platform is a native application. A JVM runs "in process" and more functional features are implemented with Java. There are about hundred jar so setting some breakpoints here and there when you have very few hints about where the feature start and ends is really hard and time consuming.