chrome dev tools "save" not working while debugging node.js app

google-chrome, javascript, node.js

Solution

This seemed to work for me. I started 2 shells:

- node-inspector --save-live-edit

- node --debug app.js

Then go to http://127.0.0.1:8080/?ws=127.0.0.1:8080&port=5858 on your browser.

Making changes to your code should save it on the hard drive.

Problem

While debugging node.js cli script in chrome dev tools (that is possible http://youtu.be/03qGA-GJXjI), I cannot save the changes I made on the fly like I can when I debug normal javascript from a website. I get an error message: "Debugger.setScriptSource failed. LiveEdit Failure: Failed to compile new version of script: SyntaxError: Unexpected token [" And then a warning: Saving of live-edit changes back to source files is disabled by configuration. Change the option "saveLiveEdit" in config.json to enable this feature. Does anyone know how to fix this? It would be really convenient to debug and edit file and save it while not leaving chrome dev tools. Thanks. btw, this is how the config.json looks like, https://github.com/node-inspector/node-inspector/blob/master/config.json. I tried changing "saveLiveEdit" option to true, but still I get the same message "Saving of live-edit changes back to source files is disabled by configuration. Change the option "saveLiveEdit" in config.json to enable this feature."

Original source