+1 vote

Per this discussion between reduz and Zylann:


It should be possible to debug tool scripts running in the editor.

This provides an example of debugging a scene running outside the editor with the -d flag:


However, it doesn't stop to allow the addition of breakpoints before the scene starts executing.

We can start the editor editing the scene like this:

godot -d -e my.tscn

However, that also loads the editor immediately without stopping to allow breakpoint entry and does not recognize any breakpoints set on scripts in the editor visually, which are lost when the editor closes.

asked Sep 16, 2019 in Engine by goshot (64 points)

I'm curious myself how to even do this. I guess it exists buried in the source code but having it documented would be nice.

I have found that if you put an assert(false) in the code, the command line debugger will stop there and you can continue from there. However, it seems buggy as the debugger than starts stopping at breakpoints that you have not created either with the command line debugger or in the editor itself.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.