Local debugger fixes and extensions

- Adds q/quit option to console debugging
- Adds options (variable_prefix)
- Breaks into debugger with Ctrl-C in local debug mode (Unix/Windows)
- Added option to list all breakpoints
- Fixes add/remove breakpoint bug (invalid path parsing)
- Minor cleanup
This commit is contained in:
Blazej Floch
2018-02-11 06:08:37 -05:00
parent 9b1fdad035
commit c45f44d856
9 changed files with 209 additions and 45 deletions

View File

@ -73,6 +73,23 @@ void OS_Unix::debug_break() {
assert(false);
};
static void handle_interrupt(int sig) {
if (ScriptDebugger::get_singleton() == NULL)
return;
ScriptDebugger::get_singleton()->set_depth(-1);
ScriptDebugger::get_singleton()->set_lines_left(1);
}
void OS_Unix::initialize_debugging() {
if (ScriptDebugger::get_singleton() != NULL) {
struct sigaction action;
action.sa_handler = handle_interrupt;
sigaction(SIGINT, &action, NULL);
}
}
int OS_Unix::unix_initialize_audio(int p_audio_driver) {
return 0;