question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger console broken, freezes and becomes unusable until reload

See original GitHub issue

Issue Type: Bug

As of 1.64, built-in debug console in VSCode freezes after a short while and becomes completely unusable.

I had filed an issue a while back (#142292) when the problem appeared, but it mysteriously went away after some changes were made to the project. I self-closed the issue as it went away, stating I’d file a new issue if it came back, so here we are.

Long story short: when using "console": "internalConsole" (or just not specifying it), the debug console cannot switch between processes, does not take input from the console, and does not put out any messages from whatever process happens to be selected. Interestingly, however, collapsable messages (i.e. those with the click-able caret that shows more info) still work, but always display nothing. The problems dissappear when using "console": "integratedTerminal", but many features are then lost.

The Log (Window) Output is flooded with the following error:

Stack Trace
[2022-03-24 18:38:17.416] [renderer3] [error] TreeError [DebugRepl] Tree element not found: [object Object]: Error: TreeError [DebugRepl] Tree element not found: [object Object]
    at A.getElementLocation (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:73:20311)
    at A.isCollapsed (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:73:19448)
    at I.isCollapsed (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:215:676)
    at G.setChildren (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:215:21876)
    at G.doRefreshNode (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:215:20958)
    at async G.doRefreshSubTree (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:215:20450)
    at async G.refreshAndRenderNode (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:215:20002)
    at async G._updateChildren (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:215:17099)
    at async G.setInput (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:215:16542)
    at async Qn.selectSession (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2263:1074)
    at async Qn.onDidFocusSession (vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2255:6099)

As requested in the other issue, here’s a short clip of the console being frozen: Observe the left sidebar still correctly switching (as one is chrome and one is node).

The output that is visible here is actually old from a previous debugging session, and not even all of it: it appears to have stopped abruptly when trying to log an action. Clearing the console doesn’t work either.

For reference, here’s the launch.json I’ve got for those two processes:

launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "app",
            "type": "node",
            "request": "launch",
            "cwd": "${workspaceFolder}/packages/app",
            "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
            "windows": {
                "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
            },
            "env": {
                "DEBUG": "horizon:*"
            },
            "outFiles": ["${workspaceFolder}/packages/app/lib/**/*.js"],
            "autoAttachChildProcesses": true,
            "sourceMaps": true,
            "runtimeArgs": ["--remote-debugging-port=9333"],
            "args": ["./lib/main.js", "--enableDevTools", "--profile", "Debug"],
            "presentation": {
                "hidden": false,
                "group": "proc",
                "order": 1
            }
        },
        {
            "name": "client",
            "type": "chrome",
            "request": "attach",
            "port": 9333,
            "timeout": 60000,
            "webRoot": "${workspaceFolder}",
            "sourceMaps": true,
            "sourceMapPathOverrides": {
                "webpack:///./~/*": "${workspaceFolder}/node_modules",
                "webpack:///./*": "${workspaceFolder}/*",
                "webpack:///*": "*"
            },
            "presentation": {
                "hidden": false,
                "group": "proc",
                "order": 2
            }
        }
    ]
}

Happy to provide any other details as needed.

Edit: Fixed the image


VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T14:33:55.248Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info
Item Value
CPUs 11th Gen Intel® Core™ i7-11370H @ 3.30GHz (8 x 3302)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.79GB (4.54GB free)
Process Argv –crash-reporter-id 4e827929-147b-4b09-b497-92eb6ff064f6
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627cf:30244335
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vsclayoutctrt:30451275
dsvsc009:30452663
pythonvsnew555:30457759
vscscmwlcmc:30438804
vscgsvid2:30447481
cppdebug:30451566
vscaat:30438848
pynewfile477:30450038

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
CynicalBusinesscommented, Apr 5, 2022

The project is unfortunately not open-source (a large internal private project), but I will try to see if I can get a minimal repro I can share working.

1reaction
roblourenscommented, Aug 25, 2022

ahhhhhhh - I’m not seeing it repro right now either. But it does get slower and slower to where it almost stops updating entirely. I can take another pass on looking at this next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS 2017 Stops Responding / Freezes / Locks up
Since yesterday, I have consistent hangs when debugging. I ran the gamut of easy fixes that came to mind: reboot; disable extensions (namely...
Read more >
Visual Studio Constantly Hangs and Freezes or Restarts ...
Exactly the same here. It freezes randomly when you open solution and during the debug in most of the cases. Nothing works to...
Read more >
Debugger crashes randomly during stepover or stepin with ...
Click the stepover or stepinto icon 2 or 3 times in quick succession and the debugger appears to hang for a min before...
Read more >
Visual studio 2019 freezes when debugging
Visual studio 2019 freezes when debugging. Please try the following steps: 1) disable any third party extensions under Extensions-->Manage ...
Read more >
Java: slow performance or hangups when starting ...
My debugger has become very slow almost to the point of being unusable. From the time I click the debug icon until it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found