vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

GitLens V12.0.1+ breaks Jest Runner debugging

Open Sam-Kearns opened this issue 3 years ago • 2 comments

Description

Environment:

  • MacBook Pro Intel Core i7
  • MacOS Monterey V12.5.1
  • VS Code v1.71.0 (latest)
  • Jest Runner v0.4.55 (latest)
  • All other extensions disabled

My user/settings.json contains only one line required for Jest Runner. Everything else has been temporarily removed while investigating this bug.

{
    "jestrunner.codeLensSelector": "**/*.{spec}.{js,jsx,ts,tsx}",
}

Expected Jest Runner behaviour:

  1. Ensure GitLens is disabled or not installed
  2. Place a breakpoint in a Node.js source file that has a Jest test
  3. Go to the Jest test file and click Jest Runners "debug" lens button
  4. Observe that Jest Runner opens a new terminal tab and executes a "cd to project base dir" command
  5. Then an additional output tab opens in the terminal panel called "Debug Jest Tests" with the "debug" icon next to the name. The command to launch the test in debug mode appears in this terminal, plus all test output.
  6. Observe that VS Code debug mode begins, the floating debug control bar appears, code execution is halted at the breakpoint, the Run & Debug panel is populated with process information.

Bug Reproduction:

  1. Install and enable GitLens V12.0.1+
  2. Go to the Jest test file and click Jest Runner's "debug" lens button again.
  3. Observe that Jest Runner opens a new terminal tab and executes a "cd to project base dir" command
  4. Observe that the additional "Debug Jest Tests" output tab never appears and the command to launch the test in debug mode never appears. No test output of any sort is observed anywhere.
  5. Observe that VS Code debug mode begins, the floating debug control bar appears, but code execution never begins and the Run & Debug panel remains blank. The "spinner" animation at the top of the Run & Debug window spins indefinitely, presumably waiting to connect to my code's process that wasn't launched.

Bug Fix:

  1. Install and enable GitLens V12.0.0 and restart VS Code
  2. Observe that the expected Jest Runner behaviour is restored

Additional Observation: When GitLens V12.0.1+ is installed and enabled, the "activity spinner" animation at the top of the VS Code Extensions panel never stops spinning, no matter how long VS Code is open. This does not occur with GitLens V12.0.0 or below.

While trying to find the exact version that introduced the bug I tried several GitLens versions. The bug was reproduced in the following GitLens versions

  • 12.2.2
  • 12.1.2
  • 12.0.7
  • 12.0.2
  • 12.0.1

Bug was NOT reproducible, and Jest Runner debug worked as expected, on these GitLens versions

  • 12.0.0
  • 11.7.0

GitLens Version

12.2.2

VS Code Version

Version: 1.71.0 Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c Date: 2022-09-01T07:25:38.437Z Electron: 19.0.12 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin x64 21.6.0 Sandboxed: No

Git Version

git version 2.32.1 (Apple Git-133)

Logs, Screenshots, Screen Captures, etc

No response

Sam-Kearns avatar Sep 12 '22 22:09 Sam-Kearns

@Sam-Kearns Do you have a sample repo (or a public repo) that exhibits this problem that we can use to reproduce/debug this?

eamodio avatar Sep 14 '22 16:09 eamodio

I don't, but I'll see what I can do. I am time poor so this might not be soon.

Sam-Kearns avatar Sep 17 '22 23:09 Sam-Kearns

Same problem here. GitLens breaks Jest Runner.

Any updates?

Disabled GitLens until this is resolved.

yolpsoftware avatar Dec 08 '22 10:12 yolpsoftware

I ran into the same issue on v13.3.2

However, I tried pre-release version v2023.3.1505 and was able to debug normally

IronsUK avatar Mar 16 '23 05:03 IronsUK

Can you please see if this issue is still reproducible in the latest Stable version of GitLens? Thanks!

eamodio avatar Mar 16 '23 22:03 eamodio

@eamodio Debugging is working for me with Gitlens v13.4.0. Thanks!

IronsUK avatar Mar 17 '23 08:03 IronsUK

This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!

github-actions[bot] avatar Mar 25 '23 05:03 github-actions[bot]

Closing this issue because it needs more information and has not had recent activity. Please re-open this issue if more details can be provided. Thanks!

github-actions[bot] avatar Apr 01 '23 05:04 github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar May 12 '23 05:05 github-actions[bot]