godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.48k stars 148 forks source link

debugger shows null value for all variables #554

Closed davidkol closed 4 months ago

davidkol commented 6 months ago

Godot version

4.1.1

VS Code version

1.85.1

Godot Tools VS Code extension version

v2.0.0, Development build (follows the master branch) from 12/20/2023

System information

Windows 10

Issue description

When hitting a breakpoint in the VS code debugger, it shows all the correct variable names but it shows their values as null, and when I type in a name for one in the Watch window it bugs out completely, showing only a colon and no value and I have to stop the debugger. All the other features seemingly work fine include the scene tree and inspector.

I am using godot 4.1.1 but i tried it with 4.2.1 and had the same issue. My editor settings are set to use vs code as the external editor, and I have the language server on 6008, and correspondingly I use that for the port value in the extension. It also appears that settings such as Enable Smart Resolve and Show Native Symbols In Editor don't affect the issue.

Steps to reproduce

use default launch options:

{
    "name": "GDScript: Launch Project",
    "type": "godot",
    "request": "launch",
    "project": "${workspaceFolder}",
    "debug_collisions": false,
    "debug_paths": false,
    "debug_navigation": false,
    "additional_options": ""
}

launch the debugger hit a breakpoint check variables

DaelonSuzuka commented 4 months ago

@davidkol Are you still experiencing this on the latest extension version(2.0.0 from the marketplace)?

davidkol commented 4 months ago

bug fixed! amazing work daelon

Iseeicy commented 4 months ago

@DaelonSuzuka

I still have this issue on my end with the latest extension version on the marketplace v2.0.0. I tried re-installing the extension, and installing it from here manually - no dice :(

LMK if I should create a new issue for this, and also what info I can provide to help debug!

Godot Version

4.1.3

VS Code Version

1.87.2

Godot Tools VS Code extension version

v2.0.0, from Marketplace

System Information

Windows 10

Calinou commented 3 months ago

There appears to already be an open issue on the subject: https://github.com/godotengine/godot-vscode-plugin/issues/432

harrison-munitz commented 1 month ago

I also have this issue. Debugging works completely fine except that all variables show as null, including non-nullable types. The logic still works normally as if the variables are set and debugging in the normal Godot editor works normally.

Godot 4.2.1 VS Code 1.89.1 godot-tools 2.0.0

Using the default/minimal launch.json from the godot-tools docs:

{
    "name": "GDScript",
    "type": "godot",
    "request": "launch",
}

I've tried other configurations but they all either show all variables as null like this, or are really buggy about synchronizing the breakpoints and if they decide to break in vs code, in the Godot editor, or not at all.

stopanddev commented 1 month ago

This bug is closed but i'm experiencing the same thing with latest version gd-tools and godot as of this post.