Breakpoints not syncing between Godot and and Vscode when using Godot Tools?

Godot Version

Godot 4.2

Question

Hello, I’m having an issue with the Godot tools Vscode extension, which I know isn’t an official piece of the Godot engine, but wanted to see if I could get insight regardless.

I’m having an issue where breakpoints set in Vscode, do not translate to the engine, and thus, I cannot use an external editor for debugging.

I’ve noticed that when setting breakpoints, the editor throws this error:

editor/debugger/debug_adapter/debug_adapter_protocol.cpp:800 - Condition "!breakpoint_list.find(breakpoint)" is true. Returning: Array()

It appears the game launches debugging otherwise, but the breakpoints set in the editor are the only ones that actually function.

They SOMETIMES, seem to work, but I can’t figure out the consistent reason why.

Additionally, here’s my launch.json file for reference:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "GDScript Godot",
      "type": "godot",
      "request": "launch",
      "project": "${workspaceFolder}\\GDProject",
      "port": 6007,
      "debugServer": 6006,
      "address": "127.0.0.1",
      "launch_game_instance": true,
      "launch_scene": false
    }
  ]
}

Any help is greatly appreciated!

Interesting thing I’ve figured out, when I have the external editor NOT set to vscode, the breakpoints synchronize fine seemingly, but as soon as vscode becomes the default debugger, breakpoints completely stop syncing properly.

I’ve the same issue.

The solution is to keep the file open in the script Editor in godot.

(note: for that, you need to disable external editor in godot editor settings. But you can edit the file in both vscode and godot)

Apparently It’s a known bug.
You can find the github issue here:

1 Like