Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails debugging - byebug starts on production environment #41

Closed
ey123 opened this issue Dec 4, 2013 · 6 comments
Closed

Rails debugging - byebug starts on production environment #41

ey123 opened this issue Dec 4, 2013 · 6 comments

Comments

@ey123
Copy link

ey123 commented Dec 4, 2013

If I forget a "byebug" command in the code and it gets deployed to production, byebug stops on the breakpoint.

When I used debugger gem it used to skip "debugger" commands.
I tried Byebug.stop() in config/environments/production.rb - didn't work.

Is there any way I can make byebug disabled for production?

Thanks.

@deivid-rodriguez
Copy link
Owner

Thanks for the report. What was exactly previous debugger behaviour. It ignored it but gave you a warning message or something?

The truth is I don't feel like spending time now on babysitting developers. Maybe you can override byebug's method and check for the environment there...

Salute.

@michaelglass
Copy link

👍 def not a byebug issue

@keichan34
Copy link

I usually put byebug in the Gemfile under the :development group, so it's not even loaded in production or staging. That way, it'll throw a NoMethodError and you'll (hopefully) catch it on your staging environment.

@deivid-rodriguez
Copy link
Owner

I'm closing this because I didn't get any feedback and because I don't think this is byebug's issue

@deivid-rodriguez
Copy link
Owner

@ey123 Funny enough, just today support for byebug forgotten calls was added to rubocop (see rubocop/rubocop#969) so it seems that this issue should be definitely closed. :)

@Alphabetus
Copy link

The truth is I don't feel like spending time now on babysitting developers. Maybe you can override byebug's method and check for the environment there...

Just came here to point the magnificent reply you posted here.
I have no words for that comment. You must be a true gent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants