문제

If you run a java process with arguments -Xdebug -agentlib:jdwp=transport=dt_socket,suspend=n,server=y,address=9000, the process stops listening on the port once the debugger attaches to it. Then, once the debugger detaches, you can’t connect to it again. Is there any way to attach the debugger once it has been detached? Or is there a jdwp proxy server that is always attached to the process and allows the debugger to attach and detach at will?

도움이 되었습니까?

해결책

Short answer is yes, you should be able to just reattach. There should be no problems doing this. There might be a race condition if multiple applications try to bind to the same port during detach/attach, but I don't see any other possible issues.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top