deivid-rodriguez / byebug

Debugging in Ruby 2
BSD 2-Clause "Simplified" License
3.34k stars 328 forks source link

Setting to disable using the last command if the current command is empty #700

Open gabrieldeal opened 4 years ago

gabrieldeal commented 4 years ago

I would like to be able to configure Byebug to treat empty commands as no-ops instead of treating them as if the user re-typed their last command. This is because I frequently press enter a few times in my Rails server terminal (to put a vertical space in the log entries printed to stdout) and then later I try to debug some code in the server. When the debugger line is executed, ByeBug reads those newlines and runs the last command (often continue).

I was wondering what you thought about adding a new set empty_command do_nothing | run_last setting to https://github.com/deivid-rodriguez/byebug/tree/master/lib/byebug/settings and using the new setting in https://github.com/deivid-rodriguez/byebug/blob/e1fb8209d56922f7bafd128af84e61568b6cd6a7/lib/byebug/interface.rb

I might be able to submit a PR if this idea sounds good to you.

deivid-rodriguez commented 3 years ago

Hi @gabrielmdeal, sorry for the lack of reply so far. I'm good with adding what you propose :+1:.