`binding.pry` for javascript console?
Try with debugger; in your code as this answer suggests. Your browser developer tools must be open.
Try with debugger; in your code as this answer suggests. Your browser developer tools must be open.
Summary Use require ‘pry’ at the top of your application. Call binding.pry in your code whenever you want to drop into the interactive session. For information on using Pry, see Turning IRB on its head with Pry and the Pry wiki. When you are done with a particular interactive session, type exit or Ctrl-D; Sinatra … Read more
Check out pry-nav, it gives you methods like next and step, which should be what you’re looking for. If you’re in regular old Pry you can use exit to go to the next binding.pry or disable-pry to exit Pry entirely.
To use reload! like the rails console command, add this code to your .pryrc # load Rails Console helpers like reload require ‘rails/console/app’ extend Rails::ConsoleMethods puts ‘Rails Console Helpers loaded’ EDIT== Gem pry-rails already do all of this, much simplier .
Please make sure to install the ‘pry-nav’ gem. I had the same error because I made the assumption that navigation commands were included into the ‘pry-rails’ gem. Add gem ‘pry-nav’ in your Gemfile, then run bundle install.
Ctrl+D, you can jump to next break or exit
Using homebrew: brew install tree Using macports: sudo port install tree Using the source: Follow these directions. (Caveat; you should use the flags/etc. that make sense.) <rant>All systems should come with tree; I use it a lot. And we can post directory structures as text, not pics.</rant>
If you’re using docker-compose, you can add these flags to docker-compose.yml: app: tty: true stdin_open: true And then attach to your process with docker attach project_app_1. pry-rails works here now. Ensure less is installed on your container for the optimal pry experience. cf. https://github.com/docker/compose/issues/423#issuecomment-141995398
To do this without any pry plugins (I was having troubles with pry-stack_explorer), just look at caller. I actually look for my project name to filter out all the irrelevant rails stack items. For example, if my project name were archie I’d use: caller.select {|line| line.include? “archie” } Which gives me the stack trace I’m … Read more
To exit Pry unconditionally, type exit-program Edit from @Nick’s comment: Also works: !!!