r/godot•
LKS

Visual Studio Code Debugging Extension?

Hey there!

I was looking into debugging gdscript with Visual Studio Code, specifically adding breakpoints and looking at the variables during execution. There is no extension that supports it yet, so I thought I would start working on one.

I'm a bit lost right now, not knowing if I have something completely wrong and don't know where to get support for visual studio code debugging extension development, so I'll just clean up the project and share it so whoever has an interest can hopefully get a headstart.

It doesn't work yet, I didn't change any of the TypeScript code in the debug/runtime files and only documented where I think the relevant information is in the source files of Godot 3.0.

Without further ado, here is the Repository on Github.

Posted Feb 8, 2018, 3:50 AM UTC

43
LKSOP•

Oh yeah, my plan right now is to study some other extensions and hopefully get it all working as simple as possible. But I'm a bit too tired and need some sleep.

1
LKSOP•

After having a look around, I guess I'll implement the adapter in C# like the mono debug example. I can at least connect from Godot to the C# Program already, now just have to take a look at the connection between vscode and my adapter then.

1
LKSOP•

Some more progress! The repo has been updates, it's a bit messy at the moment, I just shoved the c# solution as a folder into the root, the resulting godot-debug.exe has to be placed in a /bin folder which doesn't exist yet, see the initialConfiguration in the package.json (you could also change it there).

Godot doesn't start yet when debugging, and there is no functionality in the debugging adapter yet to add breakpoints or receive messages from godot yet, but when you manually start a remote-debug session with godot (127.0.0.1:12345) and close vscode, it complains about the remote debugger disconnecting, so the connection is there! :D

1
Vyqe•

I've found out that RevDeBug works the best for me. The TimeMachine is a huge help, try it out:

https://marketplace.visualstudio.com/items?itemName=RevDeBug.RecordReplayforNET-RevDeBug

1