Is there a programmatic way to turn on debugging in a running JVM instance? I am looking for an API that would make a running JVM, a debug server. The API would do the equivalent of ' -Xdebug -Xrunjdwp:transport=dt_socket,address=<host:port>,server=y,suspend=n'.
Thanks for any insights.
I think if it would be possible to create such debug possibilities "on demand" it would be a security risk, so I doubt that any such possibilities exists.
What you can do is of course Profiling using VisualVM or other profiles, connect to the VM and debug it.