Node.js – a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications.Chrome “JetBrains IDE Support” extension ( )īelow you’ll find a short list specifying toolset that may be helpful when developing JavaScript code:.NodeJS event-driven I/O server-side JavaScript environment based on V8 ( ).Karma Spectacular Test Runner for Javascript ( ).NodeJS plug-in for IntelliJ IDEA Ultimate ( ).NodeJS plugin in IntelliJ Community Edition doesn’t work ( ).WebStorm 7 EAP native support for Karma test runner ( ).Hope this small guide turns out to be helpful.
WEBSTORM NODEJS DEBUG CODE
Set the “Remote URL” field to point to “ 8100/base ”įinally, run your “Karma Server” configuration and while it’s working in the background (–auto-watch mode), set debugging breakpoints in your code and fire “Karma Debug” configuration.Browser : chose either Chrome or Firefox.URL to open : (port number depends on your configuration in file (passed as an “Application Parameter” in the previous two configurations).Select “JavaScript Debug -> Remote” in the list.P ress the “+” button in the top-left of the “Run/Debug Configurations” dialog.Configure the “Karma Debug” configuration to allow debugging of Karma unit tests.Application Parameters : start –no-single-run –auto-watch –reporters dots.Essentially take the same steps as while configuring “Karma Run”, changing only the following:.Configure the “Karma Server” configuration:.Application Parameters : run –single-run –no-auto-watch –reporters dots.“C:\Users\…\AppData\Roaming\npm\node_modules\karma\bin\karma”)
g) installed “Karma” NodeJs executable (i.e. Path to Node App JS File : Should point to the (globally, ie.Working Directory : absolute path of your AngularJS application (i.e.Path to Node: absolute path to NodeJS executable (i.e.Press the “+” button in the top-left of the “Run/Debug Configurations” dialog.Configure the “Karma Run” configuration:.“Karma Server”: to start Karma in “Continuous Integration” mode (automatic re-runs of your tests whenever files change).“Karma Run”: to perform a “single run” of your unit tests.Add the following two configurations (picture below):.Open the Run/Debug Configuration dialog by selecting “Edit Configurations” in the Run area of the main toolbar of WebStorm.Press “Restart” when asked, to restart the IDEĬonfiguring IDE to execute Karma test in NodeJS using the plug-in:.Click “Download and Install” on the “NodeJS” plug-in.Select “Plugins” (under “IDE Settings”).Open “Settings” dialog (File -> Settings… in the menu bar).Installing the NodeJS plug-in in IntelliJ IDEA: Chrome/Firefox “JetBrains IDE Support” extension (required for debugging) that can be downloaded from here.