-
Notifications
You must be signed in to change notification settings - Fork 192
Description
Steps to reproduce
See attached development_machine_installation.txt, then follow steps in expected behaviour section
development_machine_installation.txt
Expected behavior
In IDE;
- add break point to first line of [app root]/ config/application.rb;
require_relative 'boot' - start debug.
- debugger should stop at breakpoint
Actual behavior
- debugger continues without stopping
- NB: Any breakpoint further into execution of the Rails app fails to halt execution.
Work around;
Edit [app root]/ config/boot.rb
Comment out line;
- require 'bootsnap/setup'
Debugging now works throughout app as expected.
Notes;
Looking at #93, I believe this problem occurs due a combination of the following;
- new Ruby 2.5 feature "Remove
trace
instructions" (https://bugs.ruby-lang.org/issues/14104) - Rails 5.2 inclusion of bootsnap gem
NB: The same problem is occurring in a number of IDE's;
- Jetbrains; https://youtrack.jetbrains.com/issue/RUBY-20684
- RubyMine; Rubymine breakpoints no longer working after upgrading Ruby to 2.5.0 ruby-debug/ruby-debug-ide#139
- VSCode; IDE debugging of apps on Rails 5.2 broken rubyide/vscode-ruby#337
I believe this is a Ruby + bootsnap issue rather than bootsnap itself. However, I'm guessing the "best" place to fix it would be in bootsnap.
Also, I wanted to log the problem with a clear title so other Rails developers using IDE's will know what is going on, rather than spending time on searching for answers
(Apologies if my shotgun approach to submitting this issue on multiple repos is poor-form. I'm new to open-source development)
System configuration
vscode-ruby
version: 0.18.0- Ruby version: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
- Rails version: 5.2.0
- ruby-debug-ide version: 0.6.1
- debase version: 0.2.2
- VS Code version: 1.22.2 (1.22.2)
- Operating System: macOS 10.13.4 (17E199)
- Hardware (optional): MacBook Pro (13-inch, Mid 2012) & MacBook (13-inch, Mid 2010)