Monday, March 28, 2016

Visual Studio Code debugging client side JavaScript

Leave a Comment

I am using Visual Studio Code for a javascript project. You can set breakpoints and step through and debug very easily the code that runs in nodejs. Is there any way to allow breakpoints and debugging for the client side, browser running code?

Debugging via console.log gets old real quick.

2 Answers

Answers 1

For debugging in Chrome there is the Visual Studio Code: Debugger for Chrome extension. You can find this extension in the marketplace, search for debugger as told in the debugging manual. Unfortunately there is (currently) no support for other browsers,

Debugging node.js works out of the box, see the debugging manual above or John Papa's blog post.

Debugging both client and server (as Phil commented) is not possible at least in my opinion since you need to have two different launch configurations, sorry.

Answers 2

You should use developer tools which all moden browses have (F12). I prefer chrome because with wokrspaces and you can inline edit your code in browser.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment