-
-
Notifications
You must be signed in to change notification settings - Fork 219
Open
Labels
Description
Godot version
4.5
VS Code version
1.104.3
Godot Tools VS Code extension version
2.5.1
System information
MacOS 15.6.1
Issue description
Greetings. I'm the author of the GUT plugin and extension. After spinning my wheels for a couple hours I thought I'd ask for help. As of 4.5 it appears the debugger isn't connecting when I run tests through the debugger (bitwes/gut-extension#43). If a breakpoint or error is encountered the debugger isn't being invoked and Godot appears to hang.
Here's the code I've been using to launch the debugger from https://github.com/bitwes/gut-extension/blob/master/src/gut-tools.ts
...
class GodotDebugConfiguration implements vscode.DebugConfiguration{
public type = "godot";
public name = "GUT Debugger";
public request = "launch";
public project = "${workspaceFolder}";
public port = 6007;
public address = "127.0.0.1";
public launch_game_instance = true;
public launch_scene = false;
public additional_options = "";
public useGodotExtensionSettings(){
this.port = utils.getGodotConfigurationValue("lsp.serverPort", this.port);
this.address = utils.getGodotConfigurationValue("lsp.serverHost", this.address);
}
}
...
private async runGutDebugger(options:string = "") {
var debuggerSearch : vscode.Uri[] = await vscode.workspace.findFiles("**/addons/gut/gut_vscode_debugger.gd");
var gutScript = "gut_cmdln.gd";
if(debuggerSearch.length === 1){
gutScript = "gut_vscode_debugger.gd";
}
let config = new GodotDebugConfiguration();
config.useGodotExtensionSettings();
config.additional_options = ` -s \"res://addons/gut/${gutScript}\" `;
config.additional_options += options;
vscode.debug.startDebugging(undefined, config);
}Any pointers would be greatly appreciated. I barely remember how my code works and I got lost quickly since the last time I was poking around this project.
Great job btw.
Steps to reproduce
Godot Setup
- Create a Godot project (some samples here: https://github.com/bitwes/gut-extension/tree/master/GodotTestProject)
- Install GUT plugin
- If you don't use the sample, create a script with some tests
VSCode
- Install Gut-extension (https://marketplace.visualstudio.com/items?itemName=bitwes.gut-extension)
- Open a test script
- Run the gut command (shift+cmd+p on mac) "GUT: Run Current Script (debugger)".
- Tests run
- Add a breakpoint
- Run the gut command "GUT: Run Current Script (debugger)".
- Godot launches.
- Godot appears to hang
- Debugger does not kick in.