Closed guaka closed 5 years ago
The standard Node-inspector is running on each npm start
already for both Worker and the main app. Check console when spinning up the app.
See https://github.com/Trustroots/trustroots/blob/5e15aa47987fd335fba4fb98aaf5503cec3e73b9/gulpfile.js#L53-L55 https://github.com/Trustroots/trustroots/blob/5e15aa47987fd335fba4fb98aaf5503cec3e73b9/gulpfile.js#L87-L90
Unless I'm misunderstanding something and you meant some other kind of debugger?
Feel free to re-open if there was more to this!
Ah, then maybe the question is: how to debug node stuff? :)
On Sat, Oct 13, 2018 at 5:25 PM Mikael Korpela notifications@github.com wrote:
Feel free to re-open if there was more to this!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Trustroots/trustroots/issues/702#issuecomment-429550595, or mute the thread https://github.com/notifications/unsubscribe-auth/AADVyCFm0_B1LLsu8bt3TSO0LUDJgN3Yks5ukgX4gaJpZM4XaJu8 .
Do you mean how to use that debugger (see https://nodejs.org/api/debugger.html ) or something else specifically?
While the app is running, keeping eye on the console is usually plenty enough if you just want to spot errors. For breakpoints and following code flow, the standard debugger works well.
Well, I tried to launch the debugger with the debugger;
statement but I didn't work for some reason.
Using Chrome;
npm start
chrome://inspect/#devices
— note "Remote Target" list, should be empty for starterslocalhost:5858
and localhost:5859
via https://nodejs.org/en/docs/guides/debugging-getting-started/
Might be it didn't auto-initialize due because that port number doesn't seem to be configured by default (at least in Chrome) — might be "default" has changed at some point. Hope this helps!
Hi, I am new and was looking at this issue/project as part of the Hacktoberfest challenge. Is it possible to get a 'Debug' section with the info in that last comment added to the Development wiki? Or if you want to add me as an editor, I am happy to do it. It would be helpful for newcomers and future reference.
Hello @Jagjeet ! :wave: Happy to accept PR adding above link and a few words as a new section to https://github.com/Trustroots/trustroots/blob/master/INSTALL.md 💪
Awesome! I'll jump on it shortly.
https://stackoverflow.com/questions/33090353/how-to-use-node-inspector-with-npm-start-for-my-application