8 ms·
RoR Debugbar
- nickjj 3y agoIf anyone is interested in this sort of thing I started a proposal with a list of ideas and features around a Rails debug toolbar at: https://discuss.rubyonrails.org/t/proposal-a-fully-featured-web-debug-toolbar-panel-that-knows-about-rails-and-turbo https://discuss.rubyonrails.org/t/proposal-a-fully-featured-... NOTE: I'm not the author of this tool but they did end up replying in that thread. I didn't even know their tool existed until I happened to stumble upon it on Twitter well after my post. It would be neat if something like this were built out and included in Rails at some point. Especially with Rails 8 focusing on tool integrations and overall developer happiness.
- westurner 3y agoDjango Debug Toolbar > Panels > Default built-in panels, Third-party panels, API for third-party panels: https://django-debug-toolbar.readthedocs.io/en/latest/panels.html#third-party-panels https://django-debug-toolbar.readthedocs.io/en/latest/panels... Firelogger.py//middleware.py: https://github.com/binaryage/firelogger.py/blob/master/firepython/middleware.py https://github.com/binaryage/firelogger.py/blob/master/firep... Distributed tracing w/ OpenTelemetry, Jaeger; Metrics with ~JMX W3C Trace Context v1: https://www.w3.org/TR/trace-context-1/#overview https://www.w3.org/TR/trace-context-1/#overview
- the_gastropod 3y agoThis looks excellent. I love the cross-pollination of good ideas that seems to be frequently happening between the Laravel, Phoenix, and Rails frameworks.
- tommica 3y ago> cross-pollination That's a great analogy!
- jpb0104 3y agoSymfony’s dev toolbar has got to be one of the best. https://symfony.com/doc/current/profiler.html https://symfony.com/doc/current/profiler.html Always miss this in my RoR projects.
- julienbourdeau 3y agoYeah it does SO MUCH!
- ulfbert_inc 3y agoThere's peek[1], albeit not exactly the same thing [1] - https://github.com/peek/peek https://github.com/peek/peek
- julienbourdeau 3y agoI didn’t see a demo, only the closed bar with some timing stuff. Does it open to do more?
- jupp0r 3y agoLast commit was 5 years ago. I feel like this is 80% of the rails ecosystem nowadays.
- pmontra 3y agoGood idea but it seems that every developer of a project is going to have to use it, because it's a gem and it must be included in a layout. It's possible to do that conditionally based on an environment variable, but we're still adding some code to the Rails app. A better way would be to turn it into an extension to developer tools, like the ones for React and Vue. I've got them into my Firefox.
- MarceColl 3y agoHow would you be able to implement this functionality only from the frontend without ever adding backend code? You'll always need to expose this info from the backend somehow. Of course with react and vue the data is available since it's already in the frontend.
- julienbourdeau 3y agoYeah you always need a backend part as part of your dev dependencies but currently you also need to add a little snippet in your production view code. It could be a browser extension like Rails panel + meta_request but I think it’s also good that anybody working on the codebase always get the debugbar, regardless of their browser or setup.
- pmontra 3y agoThe downside is that if the project decides not to have that in the code, nobody gets it. Example: I suggest to a customer to use it. They decide they don't want it, I can't use it too.
- samtheprogram 3y agoThere’s no reason you couldn’t just leave it in your own branch of git and not merge it. It’s not that hard.
- julienbourdeau 3y agoThat’s a good point, I didn’t consider it this way.
- julienbourdeau 3y agoHi I’m the maker of the debugbar. If you have any feedback or question, just let me know. Thanks puuush for posting it.
- bt3 3y agoHey Julien, very nifty! Can you comment on the inspiration/ similarity with the Laravel Debugbar [1]? I noticed your GH says "Laravel by Night" :) [1] https://github.com/barryvdh/laravel-debugbar https://github.com/barryvdh/laravel-debugbar
- whizzter 3y agoIf you click learn-more on the linked page the first section ends with this: ".... I was able to explore my application in ways I didn't think was possible. Yet, I always missed what I was used to in PHP with the Laravel Debugbar."
- julienbourdeau 3y agoI’m a big fan of the Laravel debugbar. I even added the Jobs collection when I started working on this https://github.com/barryvdh/laravel-debugbar/pull/1470 https://github.com/barryvdh/laravel-debugbar/pull/1470
- Alifatisk 3y agoVery cool, I'll add this to my next project!
- maxlin 3y agoThought this was going to be about debugging Rigs of Rods bars (joints). Meh
- RA2lover 3y agoThought this was about visualizing the 6502 rotate right instruction problem.
- deedubaya 3y agoCool project, but I hate the use of the RoR acronym
- binsquare 3y agoFor anyone else who was confused by what ROR means, it's ruby on rails.
- loloquwowndueo 3y agoY tho?
- mvdtnz 3y agoBecause undefined acronyms suck. Plenty of space in the title for the full "Ruby on Rails Debugbar".
- deleted 3y ago[deleted]
- thr0waway001 3y agoAs someone who has used the Laravel version of this I gotta say it has been pretty damn helpful.
- preezer 3y agoVery, very, very cool Idea. I'll try it tomorrow
- aurelius83 3y agoThis seems pretty similar to https://github.com/dejan/rails_panel https://github.com/dejan/rails_panel. Was that your inspiration?
- francislavoie 3y agoLaravel's debugbar is the inspiration.
- nomilk 3y agoFirst time encountering the term 'debugbar', I see: > This project is inspired by what you get in the PHP world, with the Laravel debugbar for instance. Curious to know what a debugbar does? From a read of the docs (and a play around) it looks like it lets you navigate your site as usual, but it displays which controller/action got you to the page, any callbacks, and database queries. Anything else? What's a typical use case for this, or is it more like turn it on and it's just handy to have that extra info in your dev environment?
- indrora 3y agoIt's for having in your dev environment and/or sometimes as a toggle for "Special Requests" -- if your session is authenticated and you're marked as blessed, you get extra information about what the application is doing under the hood so you can see what's going on in production as well. Some let you add whatever information you want into the panel. It's a convenience feature to make it easier to wade through information rather than having to dredge everything out of logs by hand, which a lot of people still do.
- cwilby 3y agoWe recently installed something similar (https://miniprofiler.com https://miniprofiler.com) into a legacy ASP.NET MVC app. It is setup to only be visible in local development environments. In areas of the code where ORMs obscure the actual SQL that runs, it's shortened the amount of time and effort it takes to discover a slow route and optimize it. "Handy to have that extra info in your dev environment" is pretty spot on.
- deleted 3y ago[deleted]
- kfir 3y agoHey Julien! Great to see that you finally released this ;)
- julienbourdeau 3y agoYep! Thank you
- kfir 3y agoYou probably want to post it on this thread as well - https://www.reddit.com/r/rails/comments/ekmtgu/anything_similar_to_laraveldebugbar_for_rails/ https://www.reddit.com/r/rails/comments/ekmtgu/anything_simi...
- pdntspa 3y agoJust curious... how come noone else in the ruby scene seems to use an actual debugger? IDEA has a front-end for ruby-debug-ide and it is divine, it puts pry to shame. Does VSCode or others not have this or something? Some of the other stuff mentioned in the blog post... why tail development.log if you can tail stdout and get all that nice console coloration and such? > I hate switching constantly between the browser, and the terminal where I tail the logs. I want to see the debugging information in the same window. Get yourself multiple screens my dude. That said, this looks like an interesting project.
- charlie0 3y agoMost devs I've worked in across multiple languages don't use debuggers. They can't be bothered to spend a couple hours figuring it how to configure one. Meh, to each their own. I always spend the time configuring one and it always pays off.
- julienbourdeau 3y agoI hate multiple screens more than I hate switching windows :P
- pdntspa 3y agoWhy?
- CassandraOakly 3y agoAfter monitoring my portfolio performance, CASSANDRA_ E_ OAKLEY blew me away $70k in the last two quarters alone, I learned why these experienced traders make huge profits from the seemingly unknown market.. Also on Facebook CASSANDRA _E_ OAKLEY
- pserwylo 3y agoThe last two places I've worked I added a custom "debug bar" of sorts. We typically use in dev and lower QA environments, and they quickly become indespensible to help answer questions like "which version of service X is deployed", something that may be easy for a dev to answer as they can look at what is deployed on the server, but harder for a tester who can only access the frontend. Other useful environmental information we find useful includes "which DB is being used", which OpenShift namespace (with a link to the console), traceability for the deployed artifact (e.g. links to the GitHub release tag, CI pipeline which built the artifact, docker registry with the correctly tagged image). Especially useful if you have downstream or upstream services, is to have colour coded status info about whether the services are up. For the few days investment getting this up and running, it pays itself back in terms of time gained answering questions such as "Why doesn't this feature work? Oh, after investigation, this service was down during testing".
- thejosh 3y agoAlso handy (regardless of framework, language, etc) is if you use feature flags, if you're using actual valid credentials against a service or a local testing service (eg S3 vs minio, etc). Enabling this for non-technical users really helped also report any issues they would see, it was great for testing environments. Plus you would probably end up needing all this information anyway if you do any error tracking, so it probably exists somewhere already :-).
- aantix 3y agoVery cool project. Similar to the Ruby on Rails debugger that I wrote, which allows you to see all of the methods that are called for a given request (and param values, return values, etc). https://callstacking.com/ https://callstacking.com/
- KingOfCoders 3y agoWish there would be one for Go.
- 0xblinq 3y agoThis is amazing. Great work.