Currently, all exit/quit/kill commands require an additional confirmation step.
| when'q','quit','exit' |
| ifask'Really quit?' |
| @ui.quitarg.to_i |
| @tc << :continue |
| else |
| return:retry |
| end |
| |
| # * `kill` or `q[uit]!` |
| # * Stop the debuggee process. |
| when'kill','quit!','q!' |
| ifask'Really kill?' |
| exit!(arg || 1).to_i |
| else |
| return:retry |
| end |
❯ rdbg foo.rb
[1, 2] in foo.rb
=> 1| a = 1
2| puts(a)
--> #0 foo.rb:1:in `<main>'
(rdbg) exit
Really quit? [Y/n] Y
❯ rdbg foo.rb
[1, 2] in foo.rb
=> 1| a = 1
2| puts(a)
--> #0 foo.rb:1:in `<main>'
(rdbg) quit!
Really kill? [Y/n] Y
Without changing any existing commands, I wonder if it's ok to add the exit! command? It'll allow users to quickly exit the current session without hitting Y to confirm it.
❯ exe/rdbg foo.rb
[1, 1] in foo.rb
=> 1| puts(1)
=>#0 <main> at foo.rb:1
(rdbg) exit!
Currently, all exit/quit/kill commands require an additional confirmation step.
debug/lib/debug/session.rb
Lines 236 to 251 in 4a3046b
Without changing any existing commands, I wonder if it's ok to add the
exit!command? It'll allow users to quickly exit the current session without hittingYto confirm it.