Live data from Hacker News

Better Rails errors

github.com

11–20 of 50 posts

Re: Better Rails errors

#11

You guys would be amazed if you tried frameworks like Symfony (instead of discarding PHP for not being beautiful or whatever). It has always had these features, and in Symfony2 it only got more awesome. You even have a complete analysis for each request, that you can open with one click: https://s3.amazonaws.com/i.imm.io/OvjX.jpeg https://s3.amazonaws.com/i.imm.io/Ovk9.jpeg Edit: Being downvoted. Some people just don…

The PHP ECOSYSTEM has some awesome stuff, I completely agree. A lot of the companies with a decent amount of tech brand behind them in the HN community still use it a lot.

In saying that, the PHP LANGUAGE has some pretty glaring and terrifying warts, a fact that Rasmus doesn't try to hide.

Re: Better Rails errors

#12
post #9

What safeguards do you have in place to stop the unweary from sticking this into production? While normally I'm a massive advocate of "Just not being retarded", I suspect a lot of people are going to drop shells as a result of this gem :(

I was worried about this too when I saw it!

Re: Better Rails errors

#15
post #9

What safeguards do you have in place to stop the unweary from sticking this into production? While normally I'm a massive advocate of "Just not being retarded", I suspect a lot of people are going to drop shells as a result of this gem :(

You're right - I've just released 0.0.6 which (among other things) disables better_errors when running under Rails in production.

Re: Better Rails errors

#16
Thank you for this!

I just found an unintended use for this:

I use pry with a `binding.pry` statement to debug my code, Now I can just `raise 'Something'` to do this instead. One upside of this is that I can easily navigate through all the frames from the UI and inspect stuff. If I want to know what env vars are available in some middleware, I can just click on it in the UI and start inspecting it.

Re: Better Rails errors

#17

This was always something of a killer feature for me in Python, and one of the reasons I use Flask a lot. Good to see Rails support for in-browser debugging, it's a super convenient workflow to never have to go back to the terminal, just alt-tab from editor to browser.

Your workflow may be good, I don't mean to judge that.

But is not the rails way to be in the shell, rails console and editor at all times? Instead of trying things out in the browser you have automated testing doing that for you?

Re: Better Rails errors

#19

You guys would be amazed if you tried frameworks like Symfony (instead of discarding PHP for not being beautiful or whatever). It has always had these features, and in Symfony2 it only got more awesome. You even have a complete analysis for each request, that you can open with one click: https://s3.amazonaws.com/i.imm.io/OvjX.jpeg https://s3.amazonaws.com/i.imm.io/Ovk9.jpeg Edit: Being downvoted. Some people just don…

Does it have an inline context aware repl? It saves me the trouble of putting the breakpoint, running the request again, and removing the breakpoint.

> You even have a complete analysis for each request, that you can open with one click:

Do I get the queries generated for the request and time it took for them? And the time it took for the templates to be rendered?

Werkzeug debugger and flask-debug-toolbar are my baseline for debugging toolbars. They don't try to be everything and give me everything I need.

> You guys would be amazed if you tried frameworks like Symfony (instead of discarding PHP for not being beautiful or whatever)

Helpful exception logs and inline repls are one of n things to take into consideration. This alone isn't going to buy any converts.

At the end of day, they are convenience tools. It's not like I can't debug code or profile db requests without them. If I can get an inline context aware repl, superb. If not, good old breakpoints are mighty fine.

Re: Better Rails errors

#20
post #9

What safeguards do you have in place to stop the unweary from sticking this into production? While normally I'm a massive advocate of "Just not being retarded", I suspect a lot of people are going to drop shells as a result of this gem :(

You're right - I've just released 0.0.6 which (among other things) disables better_errors when running under Rails in production.

Awesome. Responsive authors ftw!
Post reply on HN