Comments (12)
I think so. We use some kind of Exception App to hook the console in the DebugExceptions middleware
from web-console.
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.
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.
@gsamokovarov thanks!!!
from web-console.
@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.
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.
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.
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.
@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.
better_errors is great and @charliesome too 👍
from web-console.
+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.
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)
- `WebConsole::EvaluatorTest#test_Evaluator_callers_are_cleaned_up_of_unneeded_backtraces` test failure HOT 1
- Breaking with Rails 6.1.rc1.
- CurrentAttributes gets reset for web-console requests HOT 10
- Wildcard host for ngrok HOT 2
- Still not working with Rails 6.1
- web-console gem error in ruby 2.7 and rails 6.1 HOT 2
- Missing template rails_web_console/console/run HOT 1
- Support for multiple web workers (websockets?) HOT 2
- Do not render web console for non-HTML requests HOT 5
- NameError: constant WebConsole::SourceLocation not defined HOT 13
- Faulty message: Web Console is activated in the test environment HOT 3
- Could web-console support meta keys? HOT 2
- Extend UI options for the console HOT 4
- web-console complains about being active in the test environment when tailwindcss-rails gets update HOT 8
- \
- web console failing to build on master
- Console not showing on error page HOT 4
- Permissions are not working when runs thru ngrok HOT 4
- Uncaught Error: Internal Server Error
- web-console in initializer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web-console.