You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
As discussed in issue 50701 if you have a area with "ray pickable" enabled but do not connect the input_event signal on it, the area will intercept any mouse clicks (running in STOP rather than PASS mode like other Godot events) but there will be no indication of what absorbed the mouse click. You can't step through the code to find where the click went as the 'input event' isn't linked to any code, and there is no way to have the Godot GUI act as if a breakpoint is set immediately when an event is received. There is no easy way to debug events.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The proposal is to implement some way to debug events. The suggestion on 50701 was that the feature "could be used to track down events and how they are stopped, not just for physics, but for ui in general. It could be a project option, or an option in the debug menu."
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
My thought was that when the "debug input events" option was enabled, a line of debug output would be printed when an input event was (a) evaluated, and (b) when it encountered a "STOP" condition. The node that interacted with the event would be printed in the output.
There should be a way to specify the event you want to debug. e.g. I might want to debug a right click only, or a custom "accelerate" event I've created.
There would be a way to disable/enable this via GDScript. If you have a bug you're trying to track down that only occurs the 5th time you invoke a menu for example, if you could turn on the feature via code after the 4th invocation, it would make debugging a lot simpler.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
The debugger is central to the engine.
The text was updated successfully, but these errors were encountered:
balloonpopper
changed the title
Debugging input events
Functionality to debug input events
Jul 29, 2021
Describe the project you are working on
3D Tycoon game
Describe the problem or limitation you are having in your project
As discussed in issue 50701 if you have a area with "ray pickable" enabled but do not connect the input_event signal on it, the area will intercept any mouse clicks (running in STOP rather than PASS mode like other Godot events) but there will be no indication of what absorbed the mouse click. You can't step through the code to find where the click went as the 'input event' isn't linked to any code, and there is no way to have the Godot GUI act as if a breakpoint is set immediately when an event is received. There is no easy way to debug events.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The proposal is to implement some way to debug events. The suggestion on 50701 was that the feature "could be used to track down events and how they are stopped, not just for physics, but for ui in general. It could be a project option, or an option in the debug menu."
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
My thought was that when the "debug input events" option was enabled, a line of debug output would be printed when an input event was (a) evaluated, and (b) when it encountered a "STOP" condition. The node that interacted with the event would be printed in the output.
There should be a way to specify the event you want to debug. e.g. I might want to debug a right click only, or a custom "accelerate" event I've created.
There would be a way to disable/enable this via GDScript. If you have a bug you're trying to track down that only occurs the 5th time you invoke a menu for example, if you could turn on the feature via code after the 4th invocation, it would make debugging a lot simpler.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
The debugger is central to the engine.
The text was updated successfully, but these errors were encountered: