Skip to content

Commit

Permalink
handle untitled editors when stepping
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Nov 12, 2017
1 parent 5ab09d3 commit 19e3cd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/debugger/stepper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ debugmode(on) = @msg debugmode(on)
# perform step in frontend
function stepto(state::DebuggerState)
loc = locinfo(state.stack[state.level])
stepto(Atom.fullpath(loc.filepath), loc.line, stepview(nextstate(state)))
if loc == nothing
file, line = ASTInterpreter2.determine_line_and_file(state.stack[state.level])[end]
else
file, line = loc.filepath, loc.line
end
stepto(Atom.fullpath(string(file)), line, stepview(nextstate(state)))
end
stepto(file, line, text) = @msg stepto(file, line, text)
stepto(::Void) = debugmode(false)
Expand Down

0 comments on commit 19e3cd8

Please sign in to comment.