Debugging Visual Studio JavaScript Client Code

I am using Visual Studio code for a javascript project. You can set breakpoints and perform very simple debugging of code that runs in nodejs. Is there a way to allow breakpoints and debugging points for the client side browser code?

Debugging through console.log gets old quickly.

+4
source share
4 answers

There is Visual Studio code for debugging in Chrome : a debugger for extending Chrome . You can find this extension on the market, search for the debugger, as described in the debugging manual . Unfortunately, there is currently no support for other browsers,

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

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

+9
source

, (F12). , workspaces, .

+3

chorme chrome DevTools. , .

:

  • ( URL-).

  • DevTools (F12)

  • ""

  • " " , ,

  • , , , " defination"

  • !

Debug Nodejs, , npm "debuger"?

0

Visual Studio: Chrome. launch.json node.js . Chrome launch.json. , ( ).

, , "node", . Chrome .

0

Source: https://habr.com/ru/post/1613596/


All Articles