a simple plugin for sublime text2 to debug node file in WebKit based browser.(os:window)
- nodeJS version >0.6.0
- npm
- node-inspector
- A WebKit based browser: Chrome, Safari, etc.
- Your operating system must be Windows or Linux.
-
install node-inspector (global mode) with npm
$ npm install -g node-inspector
ps: if you have trouble with node-inspector when installing in windowxp or window7, you can find answer in this link: http://stackoverflow.com/questions/11695739/installing-node-inspector-on-windows
-
download this plugin and unzip it . open the packages folder by clicking the Preferences > Browser packages... entry in your sublime text2. then copy unziped folder in this folder.
-
open the 'nodejs_debug.sublime-settings' file in plugin folder and set the parameter 'chrome_path' using your browser path!
-
open a node.js file in sublime text 2
-
press ctrl+alt+b or click item 'Nodejs Debug' on contextmenu
then you can debug your code in browser .