How to Debug javascript


I have some problems to debug Javascript, I just do these steps:
Open folder project
Open html preview
Toggle Developer tool (View / Developer / Open Developer Tool)

My sources are not in developer tool, and if I add folder and try to put some breakpoints it doesn’ t work.
Still doesn’ t work if I reload window.

I remember that everythings worked perfectly in tha past, probably I forgot to set something?

Thank you


Are you opening Dev Tools in Atom? Because that’ll open developer tools for the editor, not for your code in your project.


Yes, but I remember that if I open developer tools and then html preview in Atom I can see my sources in Dev Tools…
Is there another right way to debug javascript in Atom?

Thank you


If I’m understanding you correctly, you’re trying to debug the JavaScript for a web page that you’re building using Atom … not debug JavaScript for Atom. There isn’t anything built-in to Atom for assisting with this. In theory you could use the HTML preview capabilities of the markdown-preview package to approximate this … but it isn’t something that we’ve designed it for. It might work, it might not.

It’s probably better to load the web page in a standard browser like Chrome or Firefox and use it to debug your JavaScript.