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.