title: How can I edit javascript in my browser like I can use Firebug to edit CSS/HTML?
body: <p>Within JSP files, I have some pretty complicated Javascript.  On a production machine, we're seeing a very weird bug that we have not been able to understand.  We have never been able to replicate it in a local or development environment.  It might be related to the javascript, but I haven't found a good way to do this: use my browser to visit the page (on the production website) and then use browser tools to edit the javascript that runs on that page, including on reloads of the page.</p>
  
  <p>I'm always able to do this to tweak CSS etc, but as these questions point out, it's not obvious how to tweak JS client-side:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3701225/best-way-to-capture-javascript-errors-in-production">Best way to capture JavaScript errors in production?</a></li>
  <li><a href="https://stackoverflow.com/questions/2558346/how-to-edit-javascript-in-browser">How do you edit Javascript in the browser?</a></li>
  <li><a href="https://stackoverflow.com/questions/3203779/how-to-edit-javascript-in-firebug-in-mozilla">How to edit JavaScript in Firebug?</a></li>
  <li><a href="https://stackoverflow.com/questions/2725669/how-can-i-edit-a-js-file-sent-by-the-server-before-it-gets-to-my-browser">How can I edit a js file sent by the server before it gets to my browser?</a></li>
  <li><a href="https://stackoverflow.com/questions/3936490/how-to-replace-javascript-of-production-website-with-local-javascript">How to replace Javascript of production website with local Javascript?</a></li>
  <li><a href="https://stackoverflow.com/questions/5082844/with-firefox-w-firebug-how-can-i-write-javascript-in-the-browser-and-use-the-js">with firefox w/firebug, how can I write javascript in the browser and use the .js file objects also?</a></li>
  </ul>
  
  <p>However, those answers don't help me because:</p>
  
  <ul>
  <li>"Execute JS" (Firefox addon) doesn't seem to work (doesn't do more than the console in Chrome already can do), </li>
  <li>"Charles" might work if I'd used separated js files, but my javascript is embedded in JSP</li>
  </ul>
  
  <p>It seems like <a href="https://stackoverflow.com/questions/5191284/how-to-modify-javascript-code-on-the-fly-in-browser-in-debugging-mode/5281401#5281401">How to modify javascript code on the fly in browser in debugging mode?</a> is the closest thing to what I'm talking about, but that guy isn't able to talk about what he did because it was for his employer.</p>
  
  <p>Thanks for your help!
  Ryan</p>