Bugfix: stop in debugger left it in unusable state

This happened if the script was stopped in the debugger.
Afterwards breakpoints were ignored.
This commit is contained in:
Matthias Koefferlein 2017-02-26 23:23:20 +01:00
parent f18ca83575
commit 8e22d7bba8
1 changed files with 6 additions and 3 deletions

View File

@ -1937,9 +1937,6 @@ trace_callback (VALUE /*data*/, rb_trace_arg_t *trace_arg)
// see below for a description of s_block_exceptions
d->block_exceptions = false;
int line = rb_sourceline ();
size_t file_id = prepare_trace (RubyInterpreter::instance (), rb_sourcefile ());
RBA_TRY
if (d->exit_on_next) {
@ -1947,9 +1944,15 @@ trace_callback (VALUE /*data*/, rb_trace_arg_t *trace_arg)
}
try {
int line = rb_sourceline ();
size_t file_id = prepare_trace (RubyInterpreter::instance (), rb_sourcefile ());
RubyStackTraceProvider st_provider (d->debugger_scope);
d->current_exec_handler->trace (RubyInterpreter::instance (), file_id, line, &st_provider);
finish_trace (RubyInterpreter::instance ());
} catch (...) {
finish_trace (RubyInterpreter::instance ());
throw;