1. Add pry remote in gemfile
gem 'pry-remote', '~> 0.1.8'
gem 'pry-nav', '~> 0.2.4'
2. Run bundle install in the terminal
3. Add the following line in application.rb:
require 'pry-remote'
4. Add the following in the code where you want to stop executing and debug:
binding.remote_pry
5. Load the application in the browser. The application will stop execution once it encounters the binding.remote_pry line
6. Open up a new terminal and run the following code:
pry-remote
7. To navigate in the terminal, use the following command:
step
next
continue
exit
0 comments:
Post a Comment