godotengine / godotengine/godot-vscode-plugin
Attaching the Debugger to Running Godot 4.1 Mono Instance Does Not Work Using Latest
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
### Godot version
v4.1.2.stable.mono.official [399c9dc39]
### VS Code version
1.84.2
### Godot Tools VS Code extension version
f65033c
### System information
Windows 11
### Issue description
I'd like to debug the currently selected scene in the Godot Editor from vscode. When I run it, and connect to to the debug server from vscode, it does not trigger any of the breakpoints. It seems to connect to the debug server without error though.
When I run the same scene by launching it from vscode, it works. There are disadvantages to this in that I can't configure the scene to show debug information e.g. show collisions, etc.
NOTE: I can't test whether this works in other versions of the tool since Godot 4 debugging is not supported there yet. I'm waiting on these changes to release #452
### Steps to reproduce
1. In the Godot Editor, verify the **Editor Settings > Network > Debug** settings are the following:
**Remote Host: 127.0.0.1
Remote Port: 6007**
2. Verify the **Debug > Deploy with Remote Debug** is enabled.
3. Select a non-main scene with a script you want to debug, and run it using, "Run Current Scene (F6)".
4. In vscode, create a launch.json with the following entry:
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "GDScript: Attach to Godot",
"type": "godot",
"request": "attach",
"address": "127.0.0.1",
"port": 6007
}
]
}
```
5. Go to the script in vscode, and add breakpoints.
6. Run the above "GDScript: Attach to Godot" configuration.
7. Test the scene. None of the breakpoints should trigger.
Contributor guide
Research direction
Start by reproducing the attach flow using the provided launch.json configuration, Godot 4.1 Mono, and a scene run with “Run Current Scene (F6)”. Compare debugger behavior when the scene is launched from VS Code versus the Godot Editor; done means breakpoints trigger when attaching to the editor-launched scene.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100