title: Editing Javascript in Chrome real time, like Edit and Continue in Visual Studio
body: <p>Chrome can edit Javascript on the fly, without a full page refresh, similar to Visual Studio's edit and continue ability for code behind files. This helps when prototyping javascript functions or snippets. </p>
  
  <p>You have to hit a breakpoint, then hit the edit button. Then the current function will be unrolled, then you can step back into it with your changes in effect. Not nearly as nice as VS edit and continue, but at least it's something. Also it appears some things cannot be changed.</p>
  
  <p>Is there any other tool that can do live javascript edits, or is there a better way? Visual Studio 2010 does not as far as I can tell.</p>
  
  <pre><code>function test1() {
  
      debugger;
  
      var data_array = [];
      var newvar1 = newfunc()+'dc'; // ok - can edit
      var newvar2 = "hey2"; // ok - can edit
      var newvar3 = 4; // ok can edit
  
      var someobj = {1:"hey2", 2:"string2"}; // no - can not edit values after executed once
      var word_array = ["hello", "goodbye", "adios"]; // no - can not edit values after executed once
  
      for (var counter = 0; counter &lt; 500; counter++) {
          data_array[counter] = counter + word_array[Math.floor(Math.random() * (word_array.length))];
      }
  
  }
  
  
  function newfunc() {
       return "yes44";   
  }
  </code></pre>
  
  <p>Similar questions:<br>
  <a href="https://stackoverflow.com/questions/7497913/using-google-chrome-to-debug-and-edit-javascript-embedded-in-html-page">Using Google Chrome to debug and edit javascript embedded in HTML page</a><br>
  <a href="https://stackoverflow.com/questions/5067532/editing-in-the-chrome-debugger">Editing in the Chrome debugger</a></p>
  
  <p>Autosave plugin
  <a href="http://www.google.com/intl/cs-CZ/events/io/2010/sessions/chrome-developer-tools.html" rel="nofollow noreferrer">http://www.google.com/intl/cs-CZ/events/io/2010/sessions/chrome-developer-tools.html</a>
  Googles presentation:
  <a href="https://github.com/NV/chrome-devtools-autosave" rel="nofollow noreferrer">https://github.com/NV/chrome-devtools-autosave</a></p>