1/13/2024 0 Comments Debug node js webstormI also recently ended a large Java project where I had been using IntelliJ as my editor, since it was much more advanced than anything Emacs could offer. Lately though, I’ve been doing a lot of Node development and feeling some pain from using my favorite tool. Emacs is my first and last editor, and I’ll happily spend hours making it just the way I want it. If there is anything I can do to help improve the documentation on this please do let me know! 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.If you’ve ever worked with me, or read my blog posts, you know I am an Emacs junkie. This has got to be the most confusing and frustrating process just to debug some code. ![]() Please use `node -inspect-brk` instead.Ĭan someone shed some light on this and make sense of it all? All I want is my local debugging back. (node:37720) DeprecationWarning: `node -inspect -debug-brk` is deprecated. The local debugging tutorial here did get some results if I passed the -inpsect flag but it still give me this output and the only thing that really started working is the check symbol on the breakpoints, but it doesn't actually stop on the breakpoints: Given that node.js has a new debugging protocol how could WS have been working at all beyond v6? If I pass nothing the app starts but you cannot debug it. starting `node -r dotenv/config -r babel-register -debug-brk=50051 -expose_debug_as=v8debug src/index.js` If you look at the previous error I can see it's trying to use -debug-brk which passes -debug-brk as the node debug option but I've also tried -inspect-brk but guess what? It passes -debug-brk when I do that: Possible answer, I know it says in the docs as a user of WebStorm I don't have to worry about using the right command to debug and that the tool will just figure out the right one to use via the version of Node in the project. How could this configuration have been working long after it was broken? This incident also raises a number of questions: I've tried following the guides in the documentation but none of them seem to yield what I am looking for. What baffles me is that this configuration was working well beyond the deprecation of that feature. I've now done some research and found out that node debugger was deprecated in version 7 of node. app crashed - waiting for file changes before starting. Node: bad option: -expose_debug_as=v8debug starting `node -r dotenv/config -r babel-register -debug-brk=49865 -expose_debug_as=v8debug src/index.js` ![]() ![]() This used to work perfectly but now I'm receving the following error when I run the config: "dev": "nodemon %NODE_DEBUG_OPTION% src/index.js -exec \"node -r dotenv/config -r babel-register\"", I'm using a combination of nodemon, npm config (referring to the run/debug configurations dialog) and npm scripts. This happened after I flushed and reinstalled all my project dependencies due to an error during a build to a production server. I'm working on a Node.js project in Webstorm 2017.1.2 and my debugging has completely stopped working.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |