title: `binding.pry` for javascript console?
body: <p>In Ruby, I can type <code>binding.pry</code> anywhere in my code and at that point of execution my console will enter a REPL where I have access to all local variables, can make changes, and execute any arbitrary code.</p>
  
  <p>Example:</p>
  
  <pre><code># foo.rb
  require 'pry'
  n = 5
  binding.pry
  puts "your number is #{n}"
  </code></pre>
  
  <p>When I run it:</p>
  
  <pre><code>$ ruby foo.rb
  
  From: /Users/cgenco/Desktop/foo.rb @ line 4 :
  
      1: # foo.rb
      2: require 'pry'
      3: n = 5
   =&gt; 4: binding.pry
      5: puts "your  number is #{n}"
  
  [1] pry(main)&gt; n = 100
  =&gt; 100
  [2] pry(main)&gt; exit
  your number is 100
  </code></pre>
  
  <p>This is an incredible tool in debugging, especially for situations that require a complicated setup: I can just type <code>binding.pry</code> at the spot I need more code, mess around, figure out what code needs to written, then add the polished code to the actual source code.</p>
  
  <p>Is there a tool like <a href="https://github.com/pry/pry" rel="noreferrer">pry</a> for javascript that works in a browser console?</p>