GDScript debugging in VS Code does not work correctly

Godot Version

4.6

Question

I’ve used Godot to test a couple of game ideas as prototype as a side project in the last 2 years. I’m using VS Code as code editor and for the most time this worked very well. However, every once in a while (and especially since coming back for my latest idea) debugging has not worked fully: Setting break points in VS Code worked, but variables are not updated when stepping after a breakpoint has been hit. Same goes for all the breakpoints after the first one. It looks like the debugger loses contact somehow, but the code ist still executed.

At the moment I’m using Godot 4.6 with GDScript, the VS Code plugin ( godot-tools - Visual Studio Marketplace ) is up to date and it shows “Connected” in the lower right corner of VS Code. Launch.json does not have anything fancy, port is 6007.

As described, I can start debugging and running the code from VS Code, but variable values are not updated while stepping, which is really annoying.

Does anyone have an idea what I could be missing?

What benefits does VS Code give you that the built in editor does not? Have you considered using Rider instead?

All the benefits of a proper IDE. The Godot editor is nice, but it lacks some of the comfort and productivity features developers have come to expect nowadays. Since I use GDScript in Godot I have not considered Rider.

If you are really set on sticking with VSCode, then I recommend you ask your question to the developer of the tool. On the page you linked, there is a tab called Q&A. You can ask your question to the developer of the VSCode plugin. It is not an official Godot plugin.

Also, according to its version history, it hasn’t been updated since February:

Specifically, between when Godot 4.6-stable and 4.6.1-rc1 came out.

You said you are using 46., but if you’re not using 4.6-stable, I recommend trying that. I’d then recommend you download 4.6.3-stable and try that out because it’s possible there was a bug with the debug symbols in 4.6-stable, and it’s possible someone fixed it in the intervening 4 months. (4.6.3-stable was released on May 20th.)

You could also pretend that I’m a developer with 30 years of professional experience, and consider explaining exactly which comfort and productivity features you are referring to that you feel are missing from the Godot IDE. Chances are I’ll not only understand what you’re talking about, but might have some helpful advice for you.

Then perhaps you could explain why an IDE by JetBrains (which has a long history of being better than Microsoft when it comes to developing IDEs for specific languages) that was specifically designed for GDScript is not a good solution for using with GDScript? Cause that one is baffling me.