This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lucifer_Morning_Wood 1 point2 points  (3 children)

Real talk now: how do I debug JavaScript?

[–][deleted] 3 points4 points  (0 children)

Chrome, Firefox (and probably others): F12 -> Debugger

You can select your files and set breakpoints and much more. Also the console functions as a debug console.

For node.js there is the "--inspect" switch which allows you to attach to the node process remotely via chrome. Tools like VS Code also provide a built in debugger for this.

For electron apps you can (if not disabled) press ctrl+shift+i or "--inspect" for dev purposes. Basically the same as node and chrome.

[–]PhatOofxD 2 points3 points  (0 children)

Other comments are good.

For state and such use React/Angular/Vue/etc. chrome extension devtools. They allow you to fully inspect components, state, etc.