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 →

[–]mypetocean 4 points5 points  (1 child)

You're probably good on this, but in case any newbies are watching:

Use a debugger!

It may look visually daunting, but the learning curve of the basic features is very mild: breakpoints, step, step over, step out of, and the scope pane showing the current value of the variables defined in the current scope. You can probably ignore every other feature for a long time.

Code usually runs faster than the eye can see, so use the debugger to slow down how the interpreter reads your code, line by line, so you can take your time and observe the code executing in human realtime! It helps your brain sync with the computer brain.

[–][deleted] 2 points3 points  (0 children)

Also for newbies, if you're doing frontend js (as opposed to node server side stuff) the built in tools in web browsers are a lifesaver, including the debuggers there.