-
Notifications
You must be signed in to change notification settings - Fork 124
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
Supporting debug within Rails 7.0 #35
Comments
Thanks. |
Thanks for your prompt responses - I'll open a new issue about point 2 once we've given it some more thought around API and features, so I'll close this issue. 👍🏻 |
Regarding the 2nd point, I think it can be achieved by injecting a callback at debug/lib/debug/thread_client.rb Lines 142 to 143 in a12e1dd
With something similar to @target_frames = DEBUGGER__.capture_frames __dir__
@target_frames = @target_frames.select do |frame|
frame.location_str.match?(Rails::BacktraceCleaner::APP_DIRS_PATTERN)
end This should exclude non-app frames from any later operations. |
To support filtering "step-in/over/out" more considerations are needed. |
Sorry I couldn't understand the question correctly. What do you want to do with the debugger? |
Don't worry - I thought that |
@pixeltrix do you think the Rails example in #157 is similar what you're looking for? |
Hi @ko1
We'd really like to make debug the default debugging choice for Rails 7.0 and beyond. We were wondering how we can best make that happen and we've come up with a few questions that I hope you don't mind answering.
Is
DEBUGGER__.console
the final choice for invoking the debugger? We'd like to use something more traditional within Rails 7.0 likedebugger
, etc. and we're happy to do this within Rails itself but were wondering the best way to achieve that.A lot of opposition people have to using debuggers in their Rails apps is that they end up stepping through gem code that they haven't written and end up either giving up in frustration or getting lost. As a result they fall back on print debugging or using a console. To help overcome that, we'd like to implement a filtering mechanism similar to how Rails cleans backtraces so that when a developer steps through the code they are restricted to their application - is this something that's possible now and if it isn't how can we help make it possible?
Is the intention to ship 1.0 before Ruby 3.1 ships? We're not close to shipping 7.0 yet but were wondering whether the intention was to hold back the release until December?
Thanks for all the work you're doing on this. 👍🏻
The text was updated successfully, but these errors were encountered: