I would like to debug java applications that are using a jvmti agent I have written. This seems to only work if the jvmti agent is NOT trying to enable "can_generate_breakpoint_events" capabilities.
Trying to enable the breakpoint capabilities and starting the app in debug mode results in the following error:
ERROR: JVMTI: 98(Unknown): Unable to get necessary JVMTI capabilities. [..\src\agent.cpp:437]
Is there any way to debug an application that is using a jvmti agent that sets breakpoints as well?
I checked Java JVMTI doesn't work alongside -Xdebug -Xrunjdwp but the accepted answer does not seem to be correct as it really seems to depend on the enabled capabilities as well.
I know that profilers (like YourKit, etc) are using jvmti agents as well and still allow you to run your app in debug mode (well, maybe they are just not using the capabilities that lead to these conflicts).