1

I come from a traditional programming background, meaning that I can put a breakpoint on a section of code, and when that code is executed, the debugger throws me into the code.

When developing these web apps, it seems that the only debugging one can do is "printf" debugging and using a tool like FireFox Developer to inspect web elements.

How do I run the code so that it drops me into a debugger?Right now I am using a text editor, but not real GUI development environment.

Any pointers would be appreciated.

2
  • You can debug node scripts in chrome dev tools in Canary. Commented Feb 14, 2017 at 4:29
  • Thanks will look into it. Commented Feb 14, 2017 at 4:42

1 Answer 1

2

You can absolutely set breakpoints in your JavaScript code. You need to graduate from a text editor to an actual IDE like Webstorm which will allow you to set breakpoints for your server-side NodeJS code easily.

For your client-side Express code most IDEs have some sort of browser integration that lets you set JavaScript breakpoints, but I tend to just use the browser's built-in developer tools. Look up Firefox or Chrome developer tools and learn how to use them to do things like setting breakpoints in your code. You mentioned using Firefox developer tools to inspect elements, but you seem to have missed the Debugger tab in the Developer Tools window.

Sign up to request clarification or add additional context in comments.

3 Comments

also node --inspect whatever.js on any 6+ version of node.
sorry 6.3+. Other than that there's node-inspector
Thank you. Never heard of Webstorm. Will look into it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.