To debug a module you must get familiar with C++ debugging. Running a compiled executable straight away will get you very poor information. Also, the debugger inside Godot has nothing to do with C++, it is meant for GDScript.
print_line("Hello"); or printf("Hello\n"); is the simplest way to “debug” but you need to have a system console available when the editor opens. Like Calinou suggested, try opening the editor from the command line. To do this you must go to your project directory, write the path to the Godot executable and add the -e argument to start your project in editor mode.
See Command line tutorial — Godot Engine (stable) documentation in English
However this workflow won’t catch deeper C++ errors, and won’t give you interactive callstacks when something wrong happens. You should use a debugger to be able to catch them, step through the code, put breakpoints, look at variable values etc.
You can use GDB from command line, however if you use an IDE like VSCode, Visual Studio or QtCreator, there should be an interface letting you debug the editor by default.
Of course, to debug the editor you must also build it using target=debug in your SCons options.
See Configuring an IDE — Godot Engine (stable) documentation in English