godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.54k stars 153 forks source link

GDscript Debug Issue - Breakpoints Not working #212

Closed attishno1 closed 4 years ago

attishno1 commented 4 years ago

Hello! Thank you for viewing. I have the tools installed and run the debugger only after the launch.json file is created. Here is what I do.

No breakpoint is hit. Nothing happens.

Razoric480 commented 4 years ago
  1. Is this for a GDScript project? The debugger does not work with C# projects. Use Mono Debug for those.
  2. If you are using GDScript, does it work if you use this precompiled VSIX file? (you may have to double check the extension settings to make sure you're using the right protocol to connect to the language server. WS/websocket for 3.2.1 and below, and TCP/IP for 3.2.2 and above.)

If the file in 2 works, then you'll just need to wait for the extension to be updated in the marketplace to the latest version (though feel free to use that file until it is updated.)

sgarcia22 commented 4 years ago

I am having a similar issue. I'm using 3.2.2 and downloaded the VSIX godot-tools-1.1.1.vsix.zip and made sure the settings is set to tcp. When I click debug nothing happens, doesn't even open the game up in Godot.

When I use the VSIX above and press Debug it says: Failed to launch Godot instance: Error: Command failed: "godot" --path "" --remote-debug 127.0.0.1:6007 --breakpoints res://Scripts/Twirl.gd:11 '"godot"' is not recognized as an internal or external command, operable program or batch file.

Razoric480 commented 4 years ago

@sgarcia22 Go into the extension settings and make sure to fill in the Editor_path to your godot exe. By default, if that information is not filled in, the debugger will try to launch "godot.exe" from your PATH environment variable (and if it's not set, or it's named differently, then it won't find it.)

@attishno1 For that matter, same to you, if it's not done.

attishno1 commented 4 years ago

@Razoric480 The debugger output is working on a GDscript project, but the breakpoints don't work. That's all. For some reason I couldn't reply for the past 2 days.

Razoric480 commented 4 years ago

And you tried the custom VSIX? @attishno1

sgarcia22 commented 4 years ago

@sgarcia22 Go into the extension settings and make sure to fill in the Editor_path to your godot exe. By default, if that information is not filled in, the debugger will try to launch "godot.exe" from your PATH environment variable (and if it's not set, or it's named differently, then it won't find it.)

@attishno1 For that matter, same to you, if it's not done.

That worked! Thank you

attishno1 commented 4 years ago

And you tried the custom VSIX? @attishno1

I wasn't well for the past few days and didn't log-in. Reinstalling Windows fixed the problem for me.

paternostrox commented 3 years ago

Go into the extension settings and make sure to fill in the Editor_path to your godot exe. By default, if that information is not filled in, the debugger will try to launch "godot.exe" from your PATH environment variable (and if it's not set, or it's named differently, then it won't find it.)

This should be in the debugger setup notes on vscode store, it would help a lot of people.