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
I have promoted ImGui::DebugStartItemPicker() to public API (i am honestly not sure why it wasn't done before).
I have also added the Item Picker option to Demo->Tools->Item Picker BUT it is greyed out if io.ConfigDebugIsDebuggerPresent is not set. This is partly to promote the discovery of both the item picker and the io.ConfigDebugIsDebuggerPresent option.
It is still and always available from Metrics->Tools.
FYI
Recently added some tools in the Metrics window.
(1)
The "Item Picker" will allow you to pick an item and have dear imgui break within the call-stack of that item. This is useful if you have large UI / codebase and you would to easily find out where some UI item is emitted. This only works on item that are hoverable and have an identifier, so e.g. raw ImGui::Text() items won't work.
This will call IM_DEBUG_BREAK() which for Clang and Visual Studio default to a nice debugger break, for other compiles default to an unsatisfying IM_ASSERT(0) (can improve!). You can always #define IM_DEBUG_BREAK to anything in imconfig.h. See commit: 130b449
(2)
The "Show windows rectangles" tool allows you to visualize various rectangles which purpose may otherwise be difficult to understand. If you need to work within dear imgui codebase this can be useful to clarify what's going on.
Reacted by Marco Melorio, eclshunter, Tesla Zhang, Robin Hübner, Danila Ulyanov, G-glop, Sahnvour, Max Thrun, Choi, Mohit and 2 more
Reacted by Michał Cichoń, Tesla Zhang, Robin Hübner, Leonardo Serrano, gan_ and Mohit
Item Picker:
I also exposed a function in imgui_internal.h ImGui::DebugStartItemPicker() to enable this, so it can be wired directly in a menu or shortcut.
This tool has been incredibly useful to me in the past few days - generally when dealing with large or foreign codebase. Highly recommend trying it out.
I have promoted ImGui::DebugStartItemPicker() to public API (i am honestly not sure why it wasn't done before).
I have also added the Item Picker option to Demo->Tools BUT it is greyed out if io.ConfigDebugIsDebuggerPresent is not set. This is partly to promote the discovery of both the item picker and the io.ConfigDebugIsDebuggerPresent option.
Activity
ocornut commentedon Jul 19, 2019
Item Picker:
I also exposed a function in imgui_internal.h
ImGui::DebugStartItemPicker()to enable this, so it can be wired directly in a menu or shortcut.This tool has been incredibly useful to me in the past few days - generally when dealing with large or foreign codebase. Highly recommend trying it out.
Internals: Implement a continuable IM_DEBUG_BREAK on GCC for common a…
Internals: Implement a continuable IM_DEBUG_BREAK on GCC for common a…
Tools: Item Picker: Mouse button can be changed by holding Ctrl+Shift. (
Tools: Item Picker: Mouse button can be changed by holding Ctrl+Shift. (
Debug Tools: Item Picker: remove IMGUI_DEBUG_TOOL_ITEM_PICKER_EX sinc…
Debug Tools: Added DebugLocateItem()/DebugLocateItemOnHover() to visu…
Debug Tools: Added io.ConfigDebugIsDebuggerPresent and Debug Break bu…
Debug Tools: moved DebugStartItemPicker() to public API. Added to Dem…
ocornut commentedon Feb 20, 2024
I have promoted
ImGui::DebugStartItemPicker()to public API (i am honestly not sure why it wasn't done before).I have also added the Item Picker option to Demo->Tools BUT it is greyed out if
io.ConfigDebugIsDebuggerPresentis not set. This is partly to promote the discovery of both the item picker and theio.ConfigDebugIsDebuggerPresentoption.ocornut commentedon Jan 9, 2025
Closing this now.
Note the wiki page https://github.com/ocornut/imgui/wiki/Debug-Tools
Debug Tools: Item Picker: Always available in menu. Tweak Demo Debug …
Squashed commit of the following: