Usually you want to debug a specific problem, in which case you can isolate the print statements to certain variables or functions. Networked games are a pain to debug, as a lot of times the issues are strange race conditions that don't happen consistently.
You can use assert to check for rare conditions that should never happen, this will at least crash the game and give you some clue as to the problem.
https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-assert
Also, using the debugger is key, much better than simple print statements. But it is a lot of information, so you will need to know what you are looking for. You can set a breakpoint at a suspicious line of code, and then inspect the state of the game at that point and see if anything looks strange. This is better than print, as you can look in arrays and dictionaries, or complex classes that would be difficult to print all information about.
If that still doesn't work, you might have to look into unit testing. This is a way to ensure that the functions in your code are doing what they intend to do and there are not logical errors. This is more work to set up, but once it is working it can be automated, so it is a good way to ensure you don't introduce regressions in previously working code.