You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried a pre-release and a release version (v0.38.2) with VSCode 1.77.3. Running a test from code (little green icons) or the test view works, but if you pause and then press "restart" (Ctrl-Shift-F5) in the little floating window it stops running the current test but doesn't restart. I see threads in the debug view but they are just hanging and eventually time out and exit. The test is not restarted.
When running a test, the extension will start a local socket server communicate with the runner to get the test results. It makes sense to me that, when restart the runner, the socket connection will be killed, and this error appears.
Do you still remember which version of VS Code was used last time when this restart function work?
Hi Dave Syer (@dsyer), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Suggestions
Workaround: stop the current debug session (Shift+F5) and then rerun or debug the test from the Test Explorer (click the green debug icon).
Upgrade Debugger for Java to the latest version (v0.54.0 or newer) – recent patches addressed restart behavior in debug sessions.
If the issue persists, please file a minimal reproducible example on the vscode-java-debug repository.
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
I can confirm that this issue is still present almost 3 years later. I am on the latest versions of VS Code and all extensions, and can still reproduce it with any JUnit test case.
Activity
jdneo commentedon Apr 18, 2023
Looks like the extension does not act properly (or not listen to it at all) when a debug session restarts.
dsyer commentedon Apr 18, 2023
FWIW it used to work fine. I just upgraded to VSCode 1.77 so maybe that’s related?
jdneo commentedon Apr 18, 2023
Interesting, will take a look!
jdneo commentedon Apr 19, 2023
There is an
Error: read ECONNRESETatvscode-java-test/src/runners/baseRunner/BaseRunner.ts
Line 36 in e7c10db
When running a test, the extension will start a local socket server communicate with the runner to get the test results. It makes sense to me that, when restart the runner, the socket connection will be killed, and this error appears.
Do you still remember which version of VS Code was used last time when this
restartfunction work?dsyer commentedon Apr 19, 2023
I upgraded this week from 1.75.1, but I’m not sure I remember the last time it worked for sure.
NatashaTroth commentedon Aug 30, 2023
Hello, I have had this same problem since around April (also after a VS-Code update). Is there a fix for this problem?
MartinBernstorff commentedon Oct 24, 2024
I have the same problem here; are there any plans for a fix? :-)
MartinBernstorff commentedon Oct 24, 2024
A temporary workaround is this keyboard binding:
{ "key": "cmd+r", "command": "runCommands", "args": { "commands": [ { "command": "workbench.action.debug.stop", }, { "command": "testing.debugLastRun", } ] }, "when": "inDebugMode" },github-actions commentedon Nov 12, 2025
Hi Dave Syer (@dsyer), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Suggestions
Other references with high confidence
Other references with low confidence
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
MaddyGuthridge commentedon Mar 17, 2026
I can confirm that this issue is still present almost 3 years later. I am on the latest versions of VS Code and all extensions, and can still reproduce it with any JUnit test case.