Hello, I should debug a c++ module and I've configured Visual Studio Code with success. I'm interested to interrupt the execution flow in a specific point of a .c file of the module where is typed a key function that call in a GDscript file of my Godot project. Why this breakpoint it is not interrupted by the debugger? It seems that the execution flow does not pass through it, but must do so otherwise the function would not be recognized by the GDscript. The question is: is it possible to debug a module? Any suggestions? Thanks in advance. -j

One confusing thing is that if you tell your debugger to just run 'godot', it will only debug the page that loads up a project, that spawns another process once you load the project (which will not be debugged). To debug a particular project you need to use the command line switch '-e', and set the working directory to that which contains the project, so that you will debug the project rather than the 'chooser' page.

This will debug editing the project. I presume if you want to debug the actual project running, rather than the editor. I think for this you need to set the working directory to the project you want to run, and not use the -e switch. I'm not absolutely positive though, I'm not sure if I've used this myself, I've definitely done the -e version though.

The switch you need to set the working directory to a project is --path. If you add -e as lawnjelly mentioned it will open your project in the editor, and if you leave it off it will launch your project directly.

Depending on what your module does, you may find it useful to be able to switch between those. In QtCreator I set up multiple run configurations with and without the -e so I can easily go back and forth, I think you can do the same with launch configurations in VS Code.

3 years later