Coder Social home page Coder Social logo

Comments (12)

rafaelfranca avatar rafaelfranca commented on August 22, 2024

I think so. We use some kind of Exception App to hook the console in the DebugExceptions middleware

from web-console.

dhh avatar dhh commented on August 22, 2024

Ideal scenario would be a split screen. Top of the screen, you see all the backtrace and the other info, below it, you have the live console.

On Oct 27, 2013, at 13:08, Guillermo Iguaran [email protected] wrote:

From David Heinemeier Hansson:

"This looks pretty cool! My preferred usage of this would be if we could automatically dump you into a console when an exception happens. Is that possible? If so, I would like to include by default, but restrict to dev environment."

Sounds this possible?


Reply to this email directly or view it on GitHub.

from web-console.

gsamokovarov avatar gsamokovarov commented on August 22, 2024

Hey, that was one of the initial ideas, but over time we steered away from it. Right now it's kinda tricky, since after 0.2 we just shell out the rails console and run it through a terminal emulator. This approach has the benefit of supporting colors, autocompletions, history and what not for free, but the drawback is that we're not introspecting the current process anymore.

However, we did introspect the current process during the 0.2 days, so there is already some code in the history that does that. I can try to bring it back, alongside the current code and prototype spawning the console in the context of the current exception.

I will let you know when I have something, so you guys can review it.

from web-console.

guilleiguaran avatar guilleiguaran commented on August 22, 2024

@gsamokovarov thanks!!!

from web-console.

rafaelfranca avatar rafaelfranca commented on August 22, 2024

@gsamokovarov can we have a hybrid solution? The /console URL shell out to a new console and the error page introspec the process?

from web-console.

dhh avatar dhh commented on August 22, 2024

I remain skeptical of the value of a default mounted /console. When is that going to be useful? It needs to be restricted to only run in the development mode, so it’s running against a local app. Why wouldn’t you just use the terminal?

The error page introspection gives you something you otherwise wouldn’t have: A terminal with the context of the exception loaded. So that has some value.

On Nov 3, 2013, at 13:05, Rafael Mendonça França [email protected] wrote:

@gsamokovarov can we have a hybrid solution? The /console URL shell out to a new console and the error page introspec the process?


Reply to this email directly or view it on GitHub.

from web-console.

gsamokovarov avatar gsamokovarov commented on August 22, 2024

Sorry for the late response and the lack of code, guys. Didn't got enough free time this week.

@rafaelfranca that was my intention, yeah.

@dhh /console used to be our main thing, but once we have the error page console I can see it being the most used feature. I'll try to get some real code running this week, so we can discuss that. Afterwards we can consider disabling the default /console mount and have it opt-in instead, if you feel thats more appropriate.

from web-console.

dhh avatar dhh commented on August 22, 2024

No worries. I don’t personally consider a stand-alone /console all that useful. As part of a comprehensive Conductor package, maybe. But what I definitely would find useful would be a console on every error page that hooks straight into the issue.

Something else that would be very powerful. Allow you to drop <% debugger %> into a template and have the console launch right in that context.

So as a debugging tool, big +1.

On Nov 4, 2013, at 14:40, Genadi Samokovarov [email protected] wrote:

Sorry for the late response and the lack of code, guys. Didn't got enough free time this week.

@rafaelfranca that was my intention, yeah.

@dhh /console used to be our main thing, but once we have the error page console I can it being the most used feature. I'll try to get some real code running this week, so we can discuss that. Afterwards we can consider disabling the default /console mount and have it opt-in instead, if you feel thats more appropriate.


Reply to this email directly or view it on GitHub.

from web-console.

aantix avatar aantix commented on August 22, 2024

@dhh As for the debugging tool, why not reconsider better_errors to be included in the default Gemfile ( rails/rails#9284 )? Better_errors provides the appropriate debugging output, full repl with local context, a nice stack trace (that shows associated source as you click through it). The 'debugger' helper method could easily be added to it.

from web-console.

spastorino avatar spastorino commented on August 22, 2024

better_errors is great and @charliesome too 👍

from web-console.

antn avatar antn commented on August 22, 2024

+1 for better_errors being added to the default Gemfile. Awesome tool for debugging that I think a lot of rails developers can benefit from.

from web-console.

guilleiguaran avatar guilleiguaran commented on August 22, 2024

We decided to leave web-console as an add-on for Conductor and include better_errors by default in Rails.

Genadi will improve the default shell of better_errors using some of the ideas implemented in this gem and we would like also to improve the JRuby support in better_errors (that's my main concern about making it an default in Rails)

from web-console.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.