Debuging and monitoring Signals

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ermac

Hi, i was wondering if there is a way inside debug window to monitor all/any signal emission in the scene? i need to see it in case i’m not capturing the signal well but it is being fired properly (or i do capture it but it didn’t even fire).

:bust_in_silhouette: Reply From: ASubtleIncline

I don’t believe there is currently an option to track all fired signals. However, you can do a quick and easy test with some simple print statements.

func signal_sender() -> void:
     print("sending signal")
     emit_signal("my_signal")

func fires_on_signal() -> void:    
     print("signal received")

Of course, you would need to add a connect in there somewhere to ensure that when the signal fires it is heard. Check out the Signals documentation for more info on the connection. Let me know if you still have troubles.

Happy coding!