I know that yourkit can easily be integrated into Eclipse and you can start the program "Profile As" and it automatically connects to the Yourkit API and stats analyzing. This always runs the program and profiles it.

Now, If i have to do it in the debug mode. Is there a way to do that?

有帮助吗?

解决方案

If you want to enable profiling in debug mode, you need to manually add -agentpath option to JVM arguments in Eclipse run configuration. Please find details here http://www.yourkit.com/docs/11/help/agent.jsp

Note, that it's not very safe to user debugger and profiler agents together. For example, debugger might suspend profiler internal thread and profiler UI will not be able to communicate with profiler agent. It's not critical but please take it into account.

Disclaimer: I'm a YourKit developer.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top