Home

SPFx breakpoints and debugging from Visual Studio Code

Highlighted
New Contributor

SPFx breakpoints and debugging from Visual Studio Code

Hello guys,

 

I am trying to find a way to debug my local SPFx workbench (react, typescript webpart) from Visual Studio Code instead from Chrome, but I could not find any guides on how to attach the Chrome to Visual Studio Code and hit a breakpoint. Are there any good guides on how to do it?

 

This may be something trivial, but I am new to the react-gulp-vs code world and in the past, it was relatively easy to debug javascript with Visual Studio and IExplorer and I am wondering if easy setup exists with Visual Studio Code as well.

 

Thanks,

Velin

2 Replies

RE: SPFx breakpoints and debugging from Visual Studio Code

Hi Velin, It's possible to debug client side JS in VSC via Chrome Debugger protocol while executing accessing JS App in Chrome. There is an extension for this and nice description how it should work. Please check the link below https://code.visualstudio.com/blogs/2016/02/23/introducing-chrome-debugger-for-vs-code

Re: RE: SPFx breakpoints and debugging from Visual Studio Code

Thank you Andrew! I will see if I can configure it to work with the SPFx react webparts.