microsoft / microsoft/vscode-java-debug

Crash on extensive output in debug console

未关闭
#1,355 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

ai-triaged bug
主要语言
TypeScript
星标
591
派生
429
平均合并
1 天 9 小时
30 天内合并 PR
19

描述

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
  1. Run the test
  2. Crash

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用提供的 JUnit 5 CrashTest 重现崩溃,并在调试控制台中将其与经过限流的 noCrashTest 进行比较。从 debug-console 的输出路径开始,然后验证运行百万行测试不再导致 VS Code 崩溃,同时输出仍然可用。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, typescript, vscode
领域
devtools, testing-qa
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。