Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V 1.88 - cannot debug typescript #209785

Closed
TobyHFerguson opened this issue Apr 7, 2024 · 14 comments
Closed

V 1.88 - cannot debug typescript #209785

TobyHFerguson opened this issue Apr 7, 2024 · 14 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@TobyHFerguson
Copy link

Type: Bug

With V 1.87 I could simply set a breakpoint in my code, hit F5 and the debugger would connect and halt at the breakpoint.

With V 1.88 the debugger simply starts and finishes.

The terminal output on V 1.87 shows this:
toby@Tobys-Air-839 SCCCCManagement % cd /Users/toby/Development/GAS/SCCCCManagement ; /usr/bin/env 'NODE_OPTIONS= --require "/private/var/folders/1h/pw0_z_2j5ls_kqyv4vmff1yr0000gn/T/AppTranslocation/D8A00A47-CB44-4C99-A451-
6848AF42CC14/d/Visual Studio Code-2.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.js" --inspect-publish-uid=http' 'VSCODE_INSPECTOR_OPTIONS=:::{"inspectorIpc":"/var/folders/1h/pw0_z_2j5ls_kqyv4vmff
1yr0000gn/T/node-cdp.16517-36dc00fb-4.sock","deferredMode":false,"waitForDebugger":"","execPath":"/Users/toby/.nvm/versions/node/v20.11.1/bin/node","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"/var/folder
s/1h/pw0_z_2j5ls_kqyv4vmff1yr0000gn/T/node-debug-callback-3283da71efafc2ee"}' /Users/toby/.nvm/versions/node/v20.11.1/bin/node ./node_modules/mocha/bin/_mocha -r ts-node/register --timeout 999999 --colors /Users/toby/Develop
ment/GAS/SCCCCManagement/test/**/*.ts
Debugger attached.

But for 1.88 it just shows this:
/Users/toby/.nvm/versions/node/v20.11.1/bin/node ./node_modules/mocha/bin/_mocha -r ts-node/register --timeout 999999 --colors /Users/toby/Development/GAS/SCCCCManagement/test/**/*.ts
Debugger attached.
Waiting for the debugger to disconnect...

VS Code version: Code 1.88.0 (5c3e652, 2024-04-03T13:28:18.899Z)
OS version: Darwin x64 23.4.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz (4 x 1600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 39, 25, 17
Memory (System) 16.00GB (0.61GB free)
Process Argv --crash-reporter-id 5eae0cd6-0c33-42fd-9a8f-ba55dd9d29fb
Screen Reader no
VM 0%
Extensions (29)
Extension Author (truncated) Version
vscode-django bat 1.15.0
python-environment-manager don 1.2.4
python-extension-pack don 1.7.0
remotehub Git 0.62.0
go gol 0.41.2
vscode-mocha-test-adapter hbe 2.14.1
vscode-test-explorer hbe 2.21.1
golang-tdd joa 0.0.9
vsc-python-indent Kev 1.18.0
MagicPython mag 1.1.0
vscode-docker ms- 1.29.0
debugpy ms- 2024.4.0
isort ms- 2023.10.1
python ms- 2024.4.0
vscode-pylance ms- 2024.4.1
jupyter ms- 2024.3.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
azure-repos ms- 0.38.0
remote-repositories ms- 0.40.0
test-adapter-converter ms- 0.1.9
autodocstring njp 0.6.1
git-merger sha 0.4.1
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.3.1
jinja who 0.0.8
markdown-all-in-one yzh 3.6.2
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
dsvsc021:30996838
gd77d436:30999572

@neil176
Copy link

neil176 commented Apr 9, 2024

I'm not sure if it's the same issue, but as of 1.88.0, using the "Debug: Attach to node process" appears to be putting the wrong node process into debug mode (thus occupying port 9229 and preventing me from attaching to the one I want to). I am finding the process by pid to attach to, so am confident that there is no mistake in the process selection.

This issue is not present in the prior 1.87.2 release, as my colleague @gilles-yvetot was able to confirm by downgrading to that version.

@roblourens roblourens assigned connor4312 and unassigned roblourens Apr 10, 2024
@connor4312
Copy link
Member

/gifPlease

@VSCodeTriageBot
Copy link
Collaborator

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.

Happy coding!

@VSCodeTriageBot VSCodeTriageBot added the info-needed Issue requires more information from poster label Apr 10, 2024
@neil176
Copy link

neil176 commented Apr 10, 2024

Had some trouble with the gif capture, so I just have screenshots but hopefully they demonstrate the issue I'm seeing. What I set up to repro this is two scripts that just report their pid and then sleep in a while loop.

  • Run script A
  • Run script B
  • Copy the pid of script A process
  • Use command palette to "Debug: Attach to node process"
  • Paste in pid of script A process
  • VSCode sends a SIGUSR1 to script B process and attaches debugger (separately confirmed with an explicit process.on('SIGUSR1' ...) listener)

This seems to only reproduce when I am trying to attach to the lower numbered pid process, with the higher numbered one getting attached to incorrectly. If I separately send a SIGUSR1 to the process running script A, and then attempt to debug it, the debugger correctly attaches to it, but also incorrectly sends a SIGUSR1 to script B process (where it naturally complains that port 9229 is already in-use).

Screenshot 2024-04-10 at 06 41 07
Screenshot 2024-04-10 at 06 41 24
Screenshot 2024-04-10 at 06 41 31

@lamuertepeluda
Copy link

lamuertepeluda commented Apr 10, 2024

HI there, I tried to prepare a repository with 2 debug configurations here: https://github.com/lamuertepeluda/node-typescript-boilerplate. It's just this popular boilerplate repository with a couple of minor changes and 2 debugging configurations, 1 with ts build and the other with ts-node.

Yesterday, since I was having this issue (debugger not stopping at breakpoints on any TS project) I had to roll back to 1.87.2, which allowed me to keep working on my tasks. I turned off automatic updates and installed 1.87.2 from this link.

However (and it's odd) after upgrading to 1.88 today to check the issue on the above repository, I am not having the issue anymore 😕 . I did the install manually from within VS Code.

Now I have this version

Version: 1.88.0
Commit: 5c3e652f63e798a5ac2f31ffd0d863669328dc4c
Date: 2024-04-03T13:28:09.495Z (6 days ago)
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0

Hope this is helpful.

@halouvi
Copy link

halouvi commented Apr 10, 2024

I've encountered the same issue on 1.88, downgrading to 1.87 fixed it.

@connor4312
Copy link
Member

@lamuertepeluda are you using nvm on your computer?

@lamuertepeluda
Copy link

@lamuertepeluda are you using nvm on your computer?

Nope, I am using Volta.

@benasher44
Copy link

This is happening to me, and I am using nvm

@connor4312
Copy link
Member

Volta might have the same issue. A fix will go out in VS Code tomorrow: that's tracked by #209693

Will wait for the original reporter to respond before duplicating this...

@neil176
Copy link

neil176 commented Apr 11, 2024

I am still seeing the incorrect process get attached to on

Version: 1.88.1 (Universal)
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:42:52.765Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0

Should I create a separate issue for this?

@connor4312
Copy link
Member

Yes, your issue is unrelated

@SergioSuarezDev
Copy link

same error here using nvm & jest runner
firsttris/vscode-jest-runner#362

@connor4312
Copy link
Member

connor4312 commented Apr 16, 2024

@SergioSuarezDev please update VS Code, your issue is already fixed.

Closing this one as we've not heard back from the reporter.

@microsoft microsoft locked and limited conversation to collaborators Jun 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

9 participants