Skip to content
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

[ci-skip] Remove resolved debugger caveat from debugging guide #45704

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 0 additions & 31 deletions guides/source/debugging_rails_applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,37 +752,6 @@ This technique can save you from repeated manual input and make the debugging ex

You can find more commands and configuration options from its [documentation](https://github.com/ruby/debug).

#### Autoloading Caveat

Debugging with `debug` works fine most of the time, but there's an edge case: If you evaluate an expression in the console that autoloads a namespace defined in a file, constants in that namespace won't be found.

For example, if the application has these two files:

```ruby
# hotel.rb
class Hotel
end

# hotel/pricing.rb
module Hotel::Pricing
end
```

and `Hotel` is not yet loaded, then

```
(rdbg) p Hotel::Pricing
```

will raise a `NameError`. In some cases, Ruby will be able to resolve an unintended constant in a different scope.

If you hit this, please restart your debugging session with eager loading enabled (`config.eager_load = true`).

Stepping commands line `next`, `continue`, etc., do not present this issue. Namespaces defined implicitly only by
subdirectories are not subject to this issue either.

See [ruby/debug#408](https://github.com/ruby/debug/issues/408) for details.

Debugging with the `web-console` gem
------------------------------------

Expand Down