Skip to content

Commit 75f99a7

Browse files
committed
UI Debugger: ability to trigger a breakpoint on selected element.
1 parent c1a6e8a commit 75f99a7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/xrUICore/ui_debug.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,18 @@ void CUIDebugger::on_tool_frame()
170170
}
171171
ImGui::TableNextColumn();
172172
if (m_state.selected)
173-
m_state.selected->FillDebugInfo();
173+
{
174+
const bool debug = xrDebug::DebuggerIsPresent();
175+
if (ImGui::Button("Debug break at element"))
176+
{
177+
if (debug)
178+
DEBUG_BREAK;
179+
}
180+
if (!debug)
181+
ImGui::SetItemTooltip("No debugger attached to the process");
174182

183+
m_state.selected->FillDebugInfo();
184+
}
175185
ImGui::EndTable();
176186
}
177187
}

0 commit comments

Comments
 (0)