TIL you can debug Godot tool scripts by using another instance of Godot! #godotengine
You can! (check this comment and the one below: github.com/godotengine/... ) Since the editor is a Godot game, you can run it in editor and put breakpoints in tool scripts. (It might not help with that specific weird issue though, I hope you managed to find a fix! )