1
0
mirror of synced 2025-02-17 18:59:21 +01:00

feat: Added single stepping feature to pattern debugger

This commit is contained in:
WerWolv 2023-07-05 21:32:11 +02:00
parent ac2a609d0a
commit 695e11477e
2 changed files with 9 additions and 2 deletions

@ -1 +1 @@
Subproject commit 128bed69ea0cf4a904e17f5690aa751b6e4b8568
Subproject commit 63d2bd325837ce112e9e34b146246cda571c58e5

View File

@ -217,6 +217,11 @@ namespace hex::plugin::builtin {
if (this->m_breakpointHit) {
if (ImGui::IconButton(ICON_VS_DEBUG_CONTINUE, ImGui::GetCustomColorVec4(ImGuiCustomCol_ToolbarYellow)))
this->m_breakpointHit = false;
ImGui::SameLine();
if (ImGui::IconButton(ICON_VS_DEBUG_STEP_INTO, ImGui::GetCustomColorVec4(ImGuiCustomCol_ToolbarYellow))) {
runtime.getInternals().evaluator->pauseNextLine();
this->m_breakpointHit = false;
}
} else {
if (ImGui::IconButton(ICON_VS_DEBUG_STOP, ImGui::GetCustomColorVec4(ImGuiCustomCol_ToolbarRed)))
runtime.abort();
@ -605,10 +610,12 @@ namespace hex::plugin::builtin {
}
if (this->m_resetDebuggerVariables) {
auto pauseLine = evaluator->getPauseLine();
this->m_debuggerDrawer->reset();
this->m_resetDebuggerVariables = false;
this->m_textEditor.SetCursorPosition(TextEditor::Coordinates(pauseLine.value_or(0) - 1, 0));
auto pauseLine = evaluator->getPauseLine();
if (pauseLine.has_value())
this->m_textEditor.SetCursorPosition({ int(pauseLine.value() - 1), 0 });
}