Restart doesn't work, when hit restart button the process terminate but not restart.
Stop the program
Rerstart the program
@llgcode thanks for reaching out.
It would be very helpful if you could share a sample project with us. Even a very simplified version will help. Would you please provide that?
hi @akaroml,
I can't provide you my project, I've tried to create a sample project but can't reproduce the issue.
I found in Language Suport for Java output this warning when relaunching the program:
[Warn - 10:58:50 AM] Feb 12, 2020 10:58:50 AM Failed to destory launch files, will retry again.
I've reproduced the issue :-) in the sample project ! by setting this setting in launch.json
...
"shortenCommandLine": "jarmanifest",
...
Please found the sample project here:
java-ws-1.zip
i can reproduce it with the sample project. thanks for reporting.
this looks like an issue in the upstream, see https://github.com/microsoft/vscode/issues/87767#issuecomment-586863705.
The java debugger adds some step to clean up the temp files during handling the disconnect request. And considering the temp files may be occupied by the debuggee process, so the debug will retry 5 times for cleaning the temp files, the sleep interval for each retry is 1s.
On the other hand, vscode uses the 500ms timeout for disconnect request, see https://github.com/microsoft/vscode/issues/87767#issuecomment-587518309. That means if the disconnect request handler in the debugger didn't return the response in 500ms, the debug session will shutdown instead of restart.
I've reproduced the issue :-) in the sample project ! by setting this setting in launch.json
...
"shortenCommandLine": "jarmanifest",
...
Failed to destory launch files, will retry again.
The user used jarmanifest option, the debugger will need clean up the temp manifest jar during disconnect request. From the log file, the debugger retried one more time to clean up the temp file, that means the debugger returned the response in at least 1s. This is beyond of the vscode limit.
The fix is to change the retry interval from 1s to 100ms, this will make the debugger to return the response in 500ms.
I hope it will work in my case.
Thanks for your support.