Note that, with this proxy in place, debug sessions will never terminate on their own - you will always need to hit the "stop" button. However, if you remove the "sleep 1" (so the port is opened to node right away) the problem of only the first breakpoint in the file being hit reappears. The IDE and debugging JS has become more complex than just using node by itself with a text editor, I don't see a point in continuing to use Webstorm if it's going to start costing me time rather than saving it. With this proxy in place, breakpoints are reliably hit every time. Then, in your webstorm debug configuration change "Path to Node" from /usr/local/bin/node to /Users/youracct/bin/node-ws.sh Socat TCP4-LISTEN:$ORIG_PORT,fork,bind=127.0.0.1 TCP:localhost:$NEW_PORT As a result, WebStorm provides code completion, reference resolution, validation, and debugging capabilities for fs, path, http, and other parts of Node. "brew install socat").Ĭreate an executable shell script (I put mine in ~/bin/node-ws.sh) containing the following: Install socat if you don't already have it (e.g. Here's the exact steps to workaround the issue: Emacs has some built-in editor support for debugger. I would go as far as to say the debugger alone makes WebStorm worth having for non-trivial JavaScript development. The default Node.js debugger is terrible and slow, and WebStorm is the only replacement I’ve found that is worth using. Basically the workaround inserts a proxy between node and WebStorm, giving node time to startup before it begins sending the connections from WebStorm through. One of the key features in this category is debugging. This lets you debug Node.js applications that use. Select this checkbox to enable the WebStorm built-in debugger to re-attach to a running Node.js process after the code of the application is changed. It might work with other IDEs that generally support. This toolkit has been currently tested with Jetbrains IntelliJ IDEA, Jetbrains WebStorm and VS Code IDEs. It appears that node (at least with node v0.6.21) needs some time to finish starting up before it can properly accept debug commands from WebStorm (and maybe WebStorm is sending them differently the first time node is run versus on subsequent runs).īelow is both an (ugly) workaround and a test case that lets me toggle the bug on and off. Node.js < 8 started with -debug: choose this option to use the V8 Debugging Protocol (also known as Legacy Protocol). Get started Serverless debugging with the hands on content that will guide you on how to utilize SLAppForge Lambda Debugging Toolkit to remote debug live running AWS Lambda functions. ![]() I believe I've isolated the cause of the bug.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |