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
MetricsHelpMarker("Will call the IM_DEBUG_BREAK() macro to break in debugger.\nWarning: If you don't have a debugger attached, this will probably crash.");
14094
+
if (Checkbox("Show Item Picker", &g.DebugItemPickerActive) && g.DebugItemPickerActive)
14095
+
DebugStartItemPicker();
14096
+
Checkbox("Show \"Debug Break\" buttons in other sections", &g.IO.ConfigDebugIsDebuggerPresent);
TextUnformatted(keyboard_only ? "- Press 'Pause/Break' on keyboard." : "- Press 'Pause/Break' on keyboard.\n- or Click (may alter focus/active id).\n- or navigate using keyboard and press space.");
14585
+
Separator();
14586
+
TextUnformatted("Choose one way that doesn't interfere with what you are trying to debug!\nYou need a debugger attached or this will crash!");
14587
+
EndTooltip();
14588
+
}
14589
+
14590
+
// Special button that doesn't take focus, doesn't take input owner, and can be activated without a click etc.
14591
+
// In order to reduce interferences with the contents we are trying to debug into.
// Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro.
2093
+
// - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability.
2094
+
// - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application.
2095
+
// e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
// Tools to test correct Begin/End and BeginChild/EndChild behaviors.
2093
-
// Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()
2094
-
// This is inconsistent with other BeginXXX functions and create confusion for many users.
2095
-
// We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.
2099
+
//- Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()
2100
+
//- This is inconsistent with other BeginXXX functions and create confusion for many users.
2101
+
//- We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.
2096
2102
bool ConfigDebugBeginReturnValueOnce;// = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
2097
2103
bool ConfigDebugBeginReturnValueLoop;// = false // Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running.
2098
2104
2099
-
// Option to deactivate io.AddFocusEvent(false) handling. May facilitate interactions with a debugger when focus loss leads to clearing inputs data.
2100
-
//Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.
2101
-
//Consider using e.g. Win32's IsDebuggerPresent() as an additional filter (or see ImOsIsDebuggerPresent() in imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).
2105
+
// Option to deactivate io.AddFocusEvent(false) handling.
2106
+
//- May facilitate interactions with a debugger when focus loss leads to clearing inputs data.
2107
+
//- Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.
2102
2108
bool ConfigDebugIgnoreFocusLoss; // = false // Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing.
ImGui::SameLine(); HelpMarker("Enable various tools calling IM_DEBUG_BREAK().\n\nRequires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application.");
ImGui::SameLine(); HelpMarker("First calls to Begin()/BeginChild() will return false.\n\nTHIS OPTION IS DISABLED because it needs to be set at application boot-time to make sense. Showing the disabled option is a way to make this feature easier to discover");
486
+
ImGui::SameLine(); HelpMarker("First calls to Begin()/BeginChild() will return false.\n\nTHIS OPTION IS DISABLED because it needs to be set at application boot-time to make sense. Showing the disabled option is a way to make this feature easier to discover.");
ImGui::SameLine(); HelpMarker("Some calls to Begin()/BeginChild() will return false.\n\nWill cycle through window depths then repeat. Windows should be flickering while running.");
Copy file name to clipboardExpand all lines: imgui_internal.h
+15
Original file line number
Diff line number
Diff line change
@@ -1907,6 +1907,7 @@ struct ImGuiContext
1907
1907
ImGuiStorage WindowsById; // Map window's ImGuiID to ImGuiWindow*
1908
1908
int WindowsActiveCount; // Number of unique windows submitted by frame
1909
1909
ImVec2 WindowsHoverPadding; // Padding around resizable windows for which hovering on counts as hovering the window == ImMax(style.TouchExtraPadding, WINDOWS_HOVER_PADDING)
1910
+
ImGuiID DebugBreakInWindow; // Set to break in Begin() call.
1910
1911
ImGuiWindow* CurrentWindow; // Window being drawn into
1911
1912
ImGuiWindow* HoveredWindow; // Window the mouse is hovering. Will typically catch mouse inputs.
1912
1913
ImGuiWindow* HoveredWindowUnderMovingWindow; // Hovered window ignoring MovingWindow. Only set if MovingWindow is set.
@@ -1958,6 +1959,7 @@ struct ImGuiContext
1958
1959
ImGuiKeyRoutingTable KeysRoutingTable;
1959
1960
ImU32 ActiveIdUsingNavDirMask; // Active widget will want to read those nav move requests (e.g. can activate a button and move away from it)
1960
1961
bool ActiveIdUsingAllKeyboardKeys; // Active widget will want to read all keyboard keys inputs. (FIXME: This is a shortcut for not taking ownership of 100+ keys but perhaps best to not have the inconsistency)
1962
+
ImGuiKeyChord DebugBreakInShortcutRouting; // Set to break in SetShortcutRouting()/Shortcut() calls.
1961
1963
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
1962
1964
ImU32 ActiveIdUsingNavInputMask; // If you used this. Since (IMGUI_VERSION_NUM >= 18804) : 'g.ActiveIdUsingNavInputMask |= (1 << ImGuiNavInput_Cancel);' becomes 'SetKeyOwner(ImGuiKey_Escape, g.ActiveId) and/or SetKeyOwner(ImGuiKey_NavGamepadCancel, g.ActiveId);'
1963
1965
#endif
@@ -2074,6 +2076,7 @@ struct ImGuiContext
2074
2076
2075
2077
// Tables
2076
2078
ImGuiTable* CurrentTable;
2079
+
ImGuiID DebugBreakInTable; // Set to break in BeginTable() call.
2077
2080
int TablesTempDataStacked; // Temporary table data size (because we leave previous instances undestructed, we generally don't use TablesTempData.Size)
2078
2081
ImVector<ImGuiTableTempData> TablesTempData; // Temporary table data (buffers reused/shared across instances, support nesting)
2079
2082
ImPool<ImGuiTable> Tables; // Persistent table data
@@ -2166,6 +2169,8 @@ struct ImGuiContext
2166
2169
ImGuiDebugLogFlags DebugLogAutoDisableFlags;
2167
2170
ImU8 DebugLogAutoDisableFrames;
2168
2171
ImU8 DebugLocateFrames; // For DebugLocateItemOnHover(). This is used together with DebugLocateId which is in a hot/cached spot above.
2172
+
bool DebugBreakInLocateId; // Debug break in ItemAdd() call for g.DebugLocateId.
0 commit comments