Open CatarinaPBressan opened 10 months ago
I believe I'm having the same issue. Where adding a breakpoint in VScode works fine, but attempting to remove it then run the debug again and the breakpoint reappears!
I did notice that if the breakpoint is removed while the debugger/scene is running, it does successfully and consistently remove the breakpoint. Attempting to remove the breakpoint when the debugger/scene is not running is entirely unsuccessful for me.
@CatarinaPBressan @LeifintheWind Please post the contents of your launch.json
.
{
"version": "0.2.0",
"configurations": [
{
"name": "GDScript Godot",
"type": "godot",
"request": "launch",
"project": "${workspaceFolder}",
"port": 6006,
"debugServer": 6006,
"address": "127.0.0.1",
"launch_game_instance": true,
"launch_scene": false
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "GDScript Godot",
"type": "godot",
"request": "launch",
"project": "${workspaceFolder}",
"port": 6006,
"debugServer": 6006,
"address": "127.0.0.1",
"launch_game_instance": true,
"launch_scene": false
}
]
}
This is a known problem with using the debugServer
setting. debugServer
invokes a completely different debugging protocol between between VSCode and Godot, and it's use isn't really supported (yet).
The only thing I can recommend is waiting for the new version of this extension to be published (which I hope is soon), because I've almost entirely rewritten the debugger interface and it works much better than the old one.
Same issue in Godot 4.2.1. I'm indeed using debugServer. But I thought it was mandatory. How do you NOT use it? When I don't use it I got a whole other set of issues.
@mberdev
But I thought it was mandatory
Why do you think that? It's never been recommended or listed in this extension's documentation.
How do you NOT use it?
By waiting for the new version of godot-tools
to be published.
When I don't use it I got a whole other set of issues.
Yes, that's why I spent most of last year rewriting the extension's debugger interface.
Temporary workaround is to just type 'breakpoint' before the line you want to debug, instead of clicking the red dot thing on the side. Then when you're done with debugging just delete the line from your code.
Thanks for your hard work @DaelonSuzuka !
@mberdev
But I thought it was mandatory
Why do you think that? It's never been recommended or listed in this extension's documentation.
How do you NOT use it?
By waiting for the new version of
godot-tools
to be published.When I don't use it I got a whole other set of issues.
Yes, that's why I spent most of last year rewriting the extension's debugger interface.
To you it's obvious the difference between the several debugging systems, but to regular people it's not. We just follow tutorials titled "How to set up Godot 4.2 with VSCode" after trying to make it work by ourselves and failing.
Therefore, allow me to rephrase my question :
Is there a way to use VSCode with GDScript? i.e. a way that lets you:
FWIW I started using Godot 4.2 in the meantime and this is still the only issue that I've run into. The plugin is perfectly usable otherwise, and hits the other 2 bullet points.
Godot version
4.1.1
VS Code version
1.83.1
Godot Tools VS Code extension version
1.3.1
System information
Windows 10
Issue description
Adding breakpoints on VSCode correctly adds breakpoints in Godot and the game stops at the correct place when running through VSCode, but removing breakpoints on VSCode doesn't work sometimes: The game pauses in the line that was previously set as a breakpoint, and the breakpoint still shows in the Godot editor.
Saving the file after removing the breakpoint sometimes removes the breakpoints, but not always.
Steps to reproduce
or: