microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.46k stars 28.97k forks source link

Cannot remove a variable from watch window #213087

Closed ibobak closed 4 months ago

ibobak commented 4 months ago

Type: Bug

The problem is that I cannot remove the variable from the watch window when debugging.

Reproducible with this code: https://github.com/dllllb/pytorch-lifestream

open the notebook supervised-sequence-to-target.ipynb and do as shown on the video here https://youtu.be/qStWlzAoGgI

VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:16:23.416Z) OS version: Linux x64 6.4.6-060406-generic Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) CPU E5-2696 v4 @ 2.20GHz (88 x 1198)| |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: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|2, 1, 1| |Memory (System)|251.76GB (221.05GB free)| |Process Argv|--crash-reporter-id 27d42247-63fb-4d9e-9cb0-87d9974843dc| |Screen Reader|no| |VM|50%| |DESKTOP_SESSION|ubuntu-xorg| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu-xorg| |XDG_SESSION_TYPE|x11|
Extensions (50) Extension|Author (truncated)|Version ---|---|--- numbered-bookmarks|ale|8.4.0 project-manager|ale|12.8.0 zoomer|ant|0.3.1 vscode-django|bat|1.15.0 docs-view|bie|0.1.0 path-intellisense|chr|2.8.5 gitignore|cod|0.9.0 git-extension-pack|don|0.1.3 githistory|don|0.6.20 python-environment-manager|don|1.2.4 python-extension-pack|don|1.7.0 gitlens|eam|15.0.3 vscode-edit-csv|jan|0.9.1 vscode-icon-theme|jtl|1.6.6 vsc-python-indent|Kev|1.18.0 vscode-checkpoints|mic|1.3.3 vscode-docker|ms-|1.29.1 csdevkit|ms-|1.5.20 csharp|ms-|2.28.11 vscode-dotnet-runtime|ms-|2.0.5 vscodeintellicode-csharp|ms-|2.1.11 black-formatter|ms-|2024.2.0 debugpy|ms-|2024.6.0 pylint|ms-|2023.10.1 python|ms-|2024.6.0 vscode-pylance|ms-|2024.5.1 datawrangler|ms-|1.0.2 jupyter|ms-|2024.4.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 remote-containers|ms-|0.362.0 remote-ssh|ms-|0.110.1 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.88.2 vscode-remote-extensionpack|ms-|0.25.0 remote-explorer|ms-|0.4.3 remote-server|ms-|1.5.1 vs-keybindings|ms-|0.2.1 one-dark-theme|msk|1.14.2 autodocstring|njp|0.6.1 git-file-history|pom|1.0.1 gpack|Sey|2.0.0 markdown-preview-enhanced|shd|0.8.13 vscode-conventional-commits|viv|1.25.0 jinja|who|0.0.8 markdown-all-in-one|yzh|3.6.2 material-theme|zhu|3.17.2 vscode-open-in-github|ziy|1.3.6 (12 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 tftest:31042121 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 chatpanelt:31048053 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31049070 fchga941:31046352 pythonprt:31047983 dwnewjupyter:31046869 26j00206:31048877 ```
roblourens commented 4 months ago

Thanks for the video. I wasn't able to get the notebook to run, and I haven't seen this before. It seems like the watches model has gotten out of sync with the rendered list. Can you check for errors in the "Window" output channel in the bottom panel?

Does this happen every time?

ibobak commented 4 months ago

This is what is happening now (I made a clean run of VS code): https://youtu.be/bkGaIfRF8w4

This is the log which you were asking for:

2024-06-04 11:21:15.420 [info] Started local extension host with pid 430829.
2024-06-04 11:21:15.597 [info] [sourcegraph.cody-ai]: Command `workbench.action.moveEditorToNewWindow` already registered
2024-06-04 11:21:18.610 [info] [perf] Render performance baseline is 43ms
2024-06-04 11:21:19.223 [warning] [remote-ssh]: Couldn't find message for key setting.usseExecServer.description.
2024-06-04 11:21:21.025 [error] [Extension Host] Starting main loop. VERBOSE_DEBUG=false
2024-06-04 11:21:29.518 [info] Started local extension host with pid 431219.
2024-06-04 11:21:29.659 [info] [sourcegraph.cody-ai]: Command `workbench.action.moveEditorToNewWindow` already registered
2024-06-04 11:21:29.924 [warning] No search provider registered for scheme: file, waiting
2024-06-04 11:21:33.319 [warning] [remote-ssh]: Couldn't find message for key setting.usseExecServer.description.
2024-06-04 11:21:33.399 [info] [perf] Render performance baseline is 52ms
2024-06-04 11:21:35.113 [error] [Extension Host] Starting main loop. VERBOSE_DEBUG=false
2024-06-04 11:22:10.041 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:23:27.492 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:24:04.750 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:24:40.629 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:25:03.456 [error] Illegal value for `line`: Error: Illegal value for `line`
    at p.t (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:961)
    at Object.lineAt (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:90)
    at EditCodeAction.provideCodeActions (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:192519:48)
    at M.provideCodeActions (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:96262)
    at /usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:125241
    at Ae.s (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:120151)
    at Ae.$provideCodeActions (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:125228)
    at c.S (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:5505)
    at c.Q (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:5271)
    at c.M (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:4323)
    at c.L (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:3440)
    at a.value (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:2227)
    at o.y (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:660)
    at o.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:877)
    at u.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14175)
    at a.value (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:8023)
    at o.y (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:660)
    at o.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:877)
    at u.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14175)
    at MessagePortMain.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:6303)
    at MessagePortMain.emit (node:events:517:28)
    at MessagePortMain.emit (node:domain:489:12)
    at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)
    at Object.topLevelDomainCallback (node:domain:161:15)
    at Object.callbackTrampoline (node:internal/async_hooks:128:24)
2024-06-04 11:25:24.040 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:29:20.946 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:30:04.818 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:31:01.266 [error] Illegal value for `line`: Error: Illegal value for `line`
    at p.t (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:961)
    at Object.lineAt (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:90)
    at EditCodeAction.provideCodeActions (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:192519:48)
    at M.provideCodeActions (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:96262)
    at /usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:125241
    at Ae.s (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:120151)
    at Ae.$provideCodeActions (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:153:125228)
    at c.S (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:5505)
    at c.Q (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:5271)
    at c.M (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:4323)
    at c.L (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:3440)
    at a.value (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:2227)
    at o.y (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:660)
    at o.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:877)
    at u.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14175)
    at a.value (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:8023)
    at o.y (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:660)
    at o.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:877)
    at u.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14175)
    at MessagePortMain.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:6303)
    at MessagePortMain.emit (node:events:517:28)
    at MessagePortMain.emit (node:domain:489:12)
    at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)
    at Object.topLevelDomainCallback (node:domain:161:15)
    at Object.callbackTrampoline (node:internal/async_hooks:128:24)
2024-06-04 11:31:14.544 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:32:04.364 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
2024-06-04 11:32:43.715 [error] [Extension Host] {"stack":"Error: Timeout\n\tat Timeout._onTimeout (/home/ihor/.vscode/extensions/sourcegraph.cody-ai-1.20.1/dist/extension.node.js:169804:20)\n\tat listOnTimeout (node:internal/timers:569:17)\n\tat process.processTimers (node:internal/timers:512:7)","message":"Timeout","name":"Error"}
ibobak commented 4 months ago

My environment.yaml attached (remove txt extension).
You can reproduce the same environment and do the same debugging.

environment.yaml.txt

roblourens commented 4 months ago

I tried to set up the same notebook but I got an error from it parsing the csv, which is weird, but I couldn't figure out what was going on.

Those errors look like they are just from the sourcegraph extension and probably aren't really related. Now it looks like you aren't hitting the breakpoint in code in another file. Does it work for a breakpoint in the cell?

ibobak commented 4 months ago

I found what was the problem: there were two ptls sources:

therefore, there are two files pandas_preprocessor.py in the path and debugger is going crazy. I've fixed this problem by deleting local folder ptls and everything is working fine.

Let us just close this issue. The next time same thing arises - I will submit a new bug, and I will include the logs from output/window

roblourens commented 4 months ago

Thanks for the followup