microsoft / microsoft/vscode-java-debug
Crash on extensive output in debug console
Open
Nobody has claimed this yet.
ai-triaged
bug
- Dominant language
- TypeScript
- Stars
- 591
- Forks
- 429
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 19
Description
Flooding std-out in debug console by a JUnit test in a short amount of time seems to result in total vscode crash.
Running the given the following simple JUnit 5 "Test" results in crash:
import org.junit.jupiter.api.Test;
public class CrashTest {
@Test
public void crashTest() {
for (int i = 0; i < 1_000_000; i++) {
System.out.println((i + 1));
}
}
}
When releasing the output pressure with the example below, debug console can keep up and there is no crash.
@Test
public void noCrashTest() throws InterruptedException {
for (int i = 0; i < 1_000_000; i++) {
if (i % 1000 == 0)
Thread.sleep(500);
System.out.println((i + 1));
}
}
Environment
- Operating System: Ubuntu 22.04
- JDK version: 17.0.7
- Visual Studio Code version: 1.79.2
- Java extension version: v1.19.0
- Debugger for Java version: v0.51.0
- Test Runner for Java version: v0.39.0
Steps To Reproduce
- Run the test
- Crash
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash using the provided JUnit 5 CrashTest and compare it with the throttled noCrashTest in the debug console. Start from the debug-console output path, then verify that running the million-line test no longer crashes VS Code while output remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- devtools, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100