Skip to content

Commit fdc988b

Browse files
authored
Remove resolved debugger caveat (rails#45704)
1 parent 96236b5 commit fdc988b

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

guides/source/debugging_rails_applications.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -752,37 +752,6 @@ This technique can save you from repeated manual input and make the debugging ex
752752

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

755-
#### Autoloading Caveat
756-
757-
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.
758-
759-
For example, if the application has these two files:
760-
761-
```ruby
762-
# hotel.rb
763-
class Hotel
764-
end
765-
766-
# hotel/pricing.rb
767-
module Hotel::Pricing
768-
end
769-
```
770-
771-
and `Hotel` is not yet loaded, then
772-
773-
```
774-
(rdbg) p Hotel::Pricing
775-
```
776-
777-
will raise a `NameError`. In some cases, Ruby will be able to resolve an unintended constant in a different scope.
778-
779-
If you hit this, please restart your debugging session with eager loading enabled (`config.eager_load = true`).
780-
781-
Stepping commands line `next`, `continue`, etc., do not present this issue. Namespaces defined implicitly only by
782-
subdirectories are not subject to this issue either.
783-
784-
See [ruby/debug#408](https://github.com/ruby/debug/issues/408) for details.
785-
786755
Debugging with the `web-console` gem
787756
------------------------------------
788757

0 commit comments

Comments
 (0)