Add debugger on the last line?

# 1.cr
x = 100
debugger
 ╰─ $ cr i 1.cr 
From: /home/zw963/Crystal/share/crystal/src/kernel.cr:517:19 <Program>#exit:

    512: 
    513: # Terminates execution immediately, returning the given status code
    514: # to the invoking environment.
    515: #
    516: # Registered `at_exit` procs are executed.
 => 517: def exit(status = 0) : NoReturn
    518:   status = Crystal::AtExitHandlers.run status
    519:   Crystal.ignore_stdio_errors { STDOUT.flush }
    520:   Crystal.ignore_stdio_errors { STDERR.flush }
    521:   Process.exit(status)
    522: end

pry(exit)> x
error in line 1
Error: undefined local variable or method 'x' for top-level

Did you mean 'p'?
pry(exit)> 

Right, there’s no easy way to fix this. It’s the same if you use Ruby’s binding.pry

My workaround is to put some code after debugger.