feat: Added shortcuts for the pattern debugger

This commit is contained in:
WerWolv
2023-09-24 18:26:42 +02:00
parent 181a7c5b3d
commit 89abc8557f

View File

@@ -1312,9 +1312,26 @@ namespace hex::plugin::builtin {
this->m_textEditor.SetBreakpoints(breakpoints);
});
/* Trigger evaluation */
ShortcutManager::addGlobalShortcut(Keys::F5 + AllowWhileTyping, [this] {
this->m_triggerAutoEvaluate = true;
});
/* Continue debugger */
ShortcutManager::addGlobalShortcut(SHIFT + Keys::F9 + AllowWhileTyping, [this] {
auto &runtime = ContentRegistry::PatternLanguage::getRuntime();
if (runtime.isRunning())
this->m_breakpointHit = false;
});
/* Step debugger */
ShortcutManager::addGlobalShortcut(SHIFT + Keys::F7 + AllowWhileTyping, [this] {
auto &runtime = ContentRegistry::PatternLanguage::getRuntime();
if (runtime.isRunning()) {
runtime.getInternals().evaluator->pauseNextLine();
this->m_breakpointHit = false;
}
});
}
}