r/javascript • • Apr 08 '18

Javascript Debugging Like a PRO

https://medium.com/appsflyer/10-tips-for-javascript-debugging-like-a-pro-with-console-7140027eb5f6
49 Upvotes

11 comments sorted by

View all comments

0

u/[deleted] Apr 08 '18

[deleted]

5

u/[deleted] Apr 08 '18

Why not just make a breakpoint using the browser so that it isn't part of the code?

8

u/autra1 Apr 08 '18

In some cases that's very useful:

  • I've seen a lot of bugs with js debugger on firefox and chrome with source maps (where putting a breakpoints is not taken into account, or is on the wrong line). Okay these bugs should simply not be there, but when they are, it can help.

  • It's useful when you're debugging node applications: When the application startups, the file you're interested in might not be required yet, thus you can't find it with ctrl+p.

1

u/[deleted] Apr 08 '18

Interesting, thanks!