microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 282 forks source link

Trying to run command launching "code" #1786

Closed richtera closed 1 year ago

richtera commented 1 year ago

Type: Bug

I use the JavaScript Debugging Terminal a lot. But whenever I do git, gh, or code operations the system ends up hanging and I have to force close the terminal. I think the debugger should probably exclude "code" from trying to attach the debugger even if it's auto-attach.

VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:40:25.698Z) OS version: Darwin arm64 22.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|3, 4, 4| |Memory (System)|32.00GB (0.35GB free)| |Process Argv|Development/chatgpt-retrieval-plugin --crash-reporter-id befd3bac-437d-406e-90c6-88d659dbcb8b| |Screen Reader|no| |VM|0%|
Extensions (88) Extension|Author (truncated)|Version ---|---|--- golangwithdidi|ald|0.0.1 rtf|ale|2.7.0 vscode-tlaplus|aly|1.5.4 astro-vscode|ast|2.1.4 vscode-django|bat|1.10.0 github-markdown-preview|bie|0.3.0 markdown-checkbox|bie|0.4.0 markdown-emoji|bie|0.3.0 markdown-footnotes|bie|0.1.1 markdown-mermaid|bie|1.19.0 markdown-preview-github-styles|bie|2.0.2 markdown-yaml-preamble|bie|0.1.0 gotemplate|cas|0.4.0 vscode-eslint|dba|2.4.2 githistory|don|0.6.20 python-environment-manager|don|1.0.4 python-extension-pack|don|1.7.0 rust-syntax|dus|0.6.1 gitlens|eam|14.2.1 prettier-vscode|esb|10.1.0 vscode-jest-runner|fir|0.4.66 code-runner|for|0.12.0 copilot|Git|1.105.350 vscode-github-actions|git|0.26.1 go|gol|0.39.1 todo-tree|Gru|0.0.226 terraform|has|2.27.1 haskell|has|2.4.1 vscode-ansi|ili|1.1.6 plantuml|jeb|2.17.5 crates-completer|jed|1.2.1 vscode-peacock|joh|4.2.2 rust-doc-viewer|JSc|4.0.0 solidity|Jua|0.0.165 language-haskell|jus|3.6.0 vsc-python-indent|Kev|1.18.0 Kotlin|mat|1.7.1 vscode-docker|ms-|1.26.0 vscode-kubernetes-tools|ms-|1.3.13 playwright|ms-|1.0.15 isort|ms-|2023.10.1 python|ms-|2023.14.0 remote-containers|ms-|0.304.0 remote-ssh|ms-|0.102.0 remote-ssh-edit|ms-|0.86.0 remote-ssh-explorer|ms-|0.56.0 vscode-remote-extensionpack|ms-|0.24.0 cmake-tools|ms-|1.15.31 cpptools|ms-|1.17.4 cpptools-extension-pack|ms-|1.3.0 js-debug-nightly|ms-|2023.8.1117 makefile-tools|ms-|0.7.0 powershell|ms-|2023.6.0 remote-explorer|ms-|0.4.1 remote-server|ms-|1.4.3 vsliveshare|ms-|1.0.5883 gremlins|nho|0.26.0 env-cmd-file-syntax|Nix|0.3.0 autodocstring|njp|0.6.1 platformio-ide|pla|3.3.1 gotestexplorer|pre|0.1.13 prisma|Pri|5.2.0 quicktype|qui|12.0.46 java|red|1.21.0 vscode-yaml|red|1.14.0 rust-analyzer|rus|0.3.1631 crates|ser|0.6.0 vsc-quokka-statusbar|ske|1.3.6 stately-vscode|sta|1.14.3 svelte-vscode|sve|107.10.0 rust-pack|Swe|0.3.38 even-better-toml|tam|0.19.2 stylelint|thi|0.51.0 cmake|twx|0.0.17 har-viewer|unc|0.0.2 errorlens|use|3.13.0 vscode-lldb|vad|1.9.2 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vscode-java-debug|vsc|0.53.0 vscode-java-dependency|vsc|0.23.1 vscode-java-pack|vsc|0.25.13 vscode-java-test|vsc|0.39.1 vscode-maven|vsc|0.42.0 volar|Vue|1.8.8 quokka-vscode|Wal|1.0.558 jinja|who|0.0.8 vscode-proto3|zxh|0.5.5 (3 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 vscaac:30438847 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30803844 2e4cg342:30602488 f6dab269:30613381 showlangstatbar:30737416 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofa:30804715 pythonnosmt12:30797651 pythonidxptcf:30805731 pythonnoceb:30805159 synctok:30815622 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30812749 ```
connor4312 commented 1 year ago

The goal of the debug terminal is to debug everything. You might check out auto attach in "smart" mode as an alternative solution to your case. Currently there's no way to have smart mode only in the JS debug terminal, though that would not be difficult...

richtera commented 1 year ago

The goal of the debug terminal is to debug everything. You might check out auto attach in "smart" mode as an alternative solution to your case. Currently there's no way to have smart mode only in the JS debug terminal, though that would not be difficult...

But the problem is that due to the auto or forced attach to the debugger the code command hangs. It's also being executed as the editor command from gh and git so vscode just completely locks up if you use that terminal. The only option is to close and re-execute the command in a normal terminal.

Also: This used to work. It would quickly attach the "code" command, and since it didn't have any breakpoints just proceed to quit.