Browse Source

Added step-over, step-in and step-out functions to debugging menu

merge-requests/365/head
eidheim 10 years ago
parent
commit
019e72a444
  1. 7
      src/files.h
  2. 17
      src/menu.cc
  3. 21
      src/window.cc

7
src/files.h

@ -2,7 +2,7 @@
#define JUCI_FILES_H_
#include <string>
#define JUCI_VERSION "1.1.0"
#define JUCI_VERSION "1.1.0-1"
const std::string configjson =
"{\n"
@ -101,9 +101,12 @@ const std::string configjson =
" \"debug_start_continue\": \"<primary>y\",\n"
" \"debug_stop\": \"<primary><shift>y\",\n"
" \"debug_kill\": \"<primary><shift>k\",\n"
" \"debug_goto_stop\": \"<primary><shift>l\",\n"
" \"debug_step_over\": \"<primary>n\",\n"
" \"debug_step_into\": \"<primary>t\",\n"
" \"debug_step_out\": \"<primary><shift>t\",\n"
" \"debug_run_command\": \"<alt><shift>Return\",\n"
" \"debug_toggle_breakpoint\": \"<primary>b\",\n"
" \"debug_goto_stop\": \"<primary><shift>l\",\n"
#ifdef __linux
" \"next_tab\": \"<primary>Tab\",\n"
" \"previous_tab\": \"<primary><shift>Tab\",\n"

17
src/menu.cc

@ -289,6 +289,23 @@ Menu::Menu() {
" </section>"
" <section>"
" <item>"
" <attribute name='label' translatable='yes'>_Step _Over</attribute>"
" <attribute name='action'>app.debug_step_over</attribute>"
+accels["debug_step_over"]+ //For Ubuntu...
" </item>"
" <item>"
" <attribute name='label' translatable='yes'>_Step _Into</attribute>"
" <attribute name='action'>app.debug_step_into</attribute>"
+accels["debug_step_into"]+ //For Ubuntu...
" </item>"
" <item>"
" <attribute name='label' translatable='yes'>_Step _Out</attribute>"
" <attribute name='action'>app.debug_step_out</attribute>"
+accels["debug_step_out"]+ //For Ubuntu...
" </item>"
" </section>"
" <section>"
" <item>"
" <attribute name='label' translatable='yes'>_Run Command</attribute>"
" <attribute name='action'>app.debug_run_command</attribute>"
+accels["debug_run_command"]+ //For Ubuntu...

21
src/window.cc

@ -754,6 +754,27 @@ void Window::set_menu_actions() {
Debug::get().kill();
}
});
menu.add_action("debug_step_over", [this]() {
if(debugging) {
auto command_return=Debug::get().run_command("thread step-over");
Terminal::get().async_print(command_return.first);
Terminal::get().async_print(command_return.second, true);
}
});
menu.add_action("debug_step_into", [this]() {
if(debugging) {
auto command_return=Debug::get().run_command("thread step-in");
Terminal::get().async_print(command_return.first);
Terminal::get().async_print(command_return.second, true);
}
});
menu.add_action("debug_step_out", [this]() {
if(debugging) {
auto command_return=Debug::get().run_command("thread step-out");
Terminal::get().async_print(command_return.first);
Terminal::get().async_print(command_return.second, true);
}
});
menu.add_action("debug_run_command", [this]() {
entry_box.clear();
entry_box.entries.emplace_back(last_run_debug_command, [this](const std::string& content){

Loading…
Cancel
Save