byebug icon indicating copy to clipboard operation
byebug copied to clipboard

Using exit not only quits byebug but kills the Ruby process

Open halhenke opened this issue 10 years ago • 9 comments

Or at least it does when called from my local server - Thin 1.5.1

Unless I'm misunderstanding the documentation this is not suppose to happen.

halhenke avatar Aug 15 '14 04:08 halhenke

Hi @halhenke, can you provide me with exact steps to reproduce the bug?

exit works just fine for me and its tests are passing...

deivid-rodriguez avatar Aug 15 '14 09:08 deivid-rodriguez

@halhenke I'm going to close this for lack of feedback. If this is still happening, please reopen the issue.

deivid-rodriguez avatar Sep 18 '14 18:09 deivid-rodriguez

@deivid-rodriguez i have the same issue while i'm trying to exit byebug, it also exit rails console. :broken_heart: Is there any options to exit only byebug without reflect in rails console ?

maryambatis avatar May 09 '18 21:05 maryambatis

same here with exit or quit - rails console also closes (rails 4.2, ruby 2.4.5) - this does not happen in rails server, though. exit does kind of halt the code, though, and I get a 500 SystemExit error

(BTW, I tried quit when exit was producing this issue for me in console - I understand it may be behaving normally, but when exit acted unexpectedly, I thought maybe I was supposed to use quit, since exit is not listed in the commands list)

joemsak avatar Feb 15 '19 19:02 joemsak

I'm facing the issue again, it just doesn't exit the byebug but also does system exit.

`byebug) exit Completed 401 Unauthorized in 1767641ms (ActiveRecord: 37.0ms)

SystemExit (exit):

(byebug):1:in exit' (byebug):1:in block in load_invoice'`

shikeb avatar Nov 26 '20 10:11 shikeb

Hi! I misunderstood the original bug report. The correct command to use to exit byebug is quit, not exit. exit is not a byebug command, but a Kernel method. When whatever you typed in the byebug CLI is not a valid byebug command, byebug will evaluate whatever you typed in the current context. So, a system exit seems expected here.

deivid-rodriguez avatar Nov 26 '20 11:11 deivid-rodriguez

Hi David, thank you for your prompt response.

I used the quit but instead of stopping the byebug, it exited completely and I had to restart the server.

(byebug) quit Really quit? (y/n) y Shikebs-MacBook-Pro:intra shikeb$ rails s => Booting Puma => Rails 5.1.7 application starting in development => Run rails server -h for more startup options Puma starting in single mode...

  • Version 3.11.3 (ruby 2.6.5-p114), codename: Love Song
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://0.0.0.0:3000 Use Ctrl-C to stop

https://jmp.sh/u1IT67q

shikeb avatar Nov 26 '20 11:11 shikeb

Ah ok, so quit is doing the same thing. I'll reopen this then.

deivid-rodriguez avatar Nov 26 '20 11:11 deivid-rodriguez

https://stackoverflow.com/questions/30627186/make-byebug-finish-executing-without-exiting-pry

jpriollaud avatar Jul 31 '22 02:07 jpriollaud