Skip to content

Error processing scopes: TypeError: cannot read properties of undefined (reading createScope ) #1643

Closed

Description

@frameseeker

Type: Bug

This problem occurs when I am using the Start Debugging (F5) command with a Breakpoint on a loop and try to print the output on the console.

JS example code:

for (let i=0;i<=5;i++) {
console.log(i);
}

When executing the Step Into (F11) command multiple times it only prints on the console a "0". The other outputs do not show up, if you proceed to use the same command.

The error message showing is: "Error processing scopes: TypeError: cannot read properties of undefined (reading createScope )"

I have backed up with a previous Visual Studio Code version (1.75.1) and everything is working fine there, but when I upgrade, the same error is present.

VS Code version: Code 1.77.0 (7f329fe6c66b0f86ae1574c2911b681ad5a45d63, 2023-03-29T10:02:16.981Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No

System Info
Item Value
CPUs AMD Ryzen 5 5600H with Radeon Graphics (12 x 3294)
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.36GB (24.75GB free)
Process Argv --crash-reporter-id 05585db5-74a9-4777-90ee-91153293e6aa
Screen Reader no
VM 0%
Extensions (1)
Extension Author (truncated) Version
JavaScriptSnippets xab 1.8.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
nodejswelcome1:30587005
2e4cg342:30602488
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
6233i204:30672705
vsctsb:30677850
pythonb192cf:30669361
defaultazurewalk:30687958
pythonms35:30701012

Activity

  1. popovalexei commented on Apr 2, 2023

    @popovalexei

    Hello! Starting from yesterday I am experiencing this issue as well on MacBook Air M1. Tried to uninstall and then install VSC again, but the error is still there.

  2. roblourens commented on Apr 3, 2023

    @roblourens
    Member

    Do you recognize that error Connor Peet (@connor4312)? I don't think it's coming from vscode.

  3. roblourens commented on Apr 3, 2023

    @roblourens
    Member

    frameseeker do you have a .vscode/launch.json in your workspace, or are you just running that .js file directly?

  4. connor4312 commented on Apr 3, 2023

    @connor4312
    Member

    Yea it's coming from js-debug. Looks like a race that could be hit if the runtime was really slow for certain requests. An easy fix, but I'm curious to see debug logs if you can grab them to see if there's anything obvious that might be causing the slowdown.

    /jsDebugLogs

  5. vscodenpa commented on Apr 3, 2023

    @vscodenpa

    Please collect trace logs using the following instructions:

    If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

    ⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to [email protected]

  6. added
    info-needed
    on Apr 3, 2023
  7. frameseeker commented on Apr 4, 2023

    @frameseeker
    Author

    frameseeker do you have a .vscode/launch.json in your workspace, or are you just running that .js file directly?

    roblourens I am running only a .js file without a launch.json. The only JSON file on my Visual Studio Code is the settings.json with below configuration:

    {
    "launch": {

        "configurations": [
            {
                "type": "node",
                "request": "launch",
                "name": "Launch Program",
                "program": "${file}"
            }
        ],
        "compounds": []
    },
    "update.enableWindowsBackgroundUpdates": false,
    

    }

  8. AtanasDinkov commented on Apr 4, 2023

    @AtanasDinkov

    Hello, Everyone,

    My VSCode updated automatically a few days ago to 1.77.0 and I am hitting the same error while trying to console.log an array during debugging. The program execution runs fine, though.
    Running on Ubuntu, maybe not a good idea to have two new things at once (Linux and learning to code). I do understand my post is of little value, but do not know what I do not know at this point.
    Tried installing an older version of VSCode, there are path related issues, so I cannot run the debugger or program itself at all to tell the difference.
    This is just to emphasize on the fact, that before the update 6 days ago this was working fine for me as well.

    (One day I will look back with a smile on this lame first post)

    Kind Regards.

  9. added
    bug
    and removed
    info-needed
    on Apr 5, 2023
  10. added a commit that references this issue on Apr 5, 2023
    61da270
  11. added a commit that references this issue on Apr 5, 2023
    483425e
  12. nikola1031 commented on Apr 7, 2023

    @nikola1031

    Hey, having this issue as well. Stepping into a function doesn't work properly. Is this supposed to be fixed? Running v1.77.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions