While debugging JavaScript, we can use the Console tab to execute arbitrary JavaScript code within the execution context. One of them is the new Live Console in the PhpStorm JavaScript and Node.js debugger. Set the following: Working directory to root folder. Some features are so (seamingly) simple yet so powerful. This article originally appeared on Alex’s Notebook. Debugging in JetBrains IDE (WebStorm, PhpStorm, IntelliJ IDEA etc.). Solve the problem that Nodejs has no code intelligent prompt in Webstorm, and Coding assistance for Node.js cant be checked or its okay, Programmer Sought. How the debugger works in WebStorm is beyond the scope of this article, but now you can set breakpoints in your code and start debugging as you would as though the application were running locally instead of inside of a Docker container. If everything is setup correctly, WebStorm will have connected to your Node.js application via port 9229 and will have started the debug session. After it is started, click on the little bug icon in the top right corner of WebStorm or by clicking “Debug ‘Debug’” in the Run menu (the name you chose for your configuration will appear in the single quotation marks). Once the configuration is finished, we can now run the debugger.įirst, fire up your Docker container as usual. Now WebStorm is correctly configured to debug a Node.js application in a Docker container and all we have left to do is try it out. Once you have given it a name of your choice, click OK to close the window.
#Phpstorm nodejs install#
Install and enable the Node.js Remote Interpreter plugin on the Settings/Preferences Plugins page, tab Marketplace, as described in Installing plugins from JetBrains repository. WebStorm “Run/Debug Configurations” Window With Vagrant, you can quickly bootstrap your Node.js application to run, debug, and profile it from PhpStorm.