From the course: SharePoint Framework for Developers: 2 Authoring and Debugging Solutions

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Debug SPFx web parts in Visual Studio Code

Debug SPFx web parts in Visual Studio Code

From the course: SharePoint Framework for Developers: 2 Authoring and Debugging Solutions

Start my 1-month free trial

Debug SPFx web parts in Visual Studio Code

- Now we can run our SharePoint framework solution web part. Can we debug it? Okay, so, debugging the solution. There are two different ways of doing it. You can debug it in VS Code, or you can debug it in the browser. I prefer to debug it in the browser, but let me show you both and evaluate the pros and cons, and you can make up your mind which one you like better. So go to the Dart VS Code folder, look at the launch.json file. Here you will find two configurations of the project template is added for us. One that is pointing to the local workbench, and second that is pointing to the posted workbench, the idea being that here is where you will point it to the Office 365 site. I haven't shown this to you yet, but you can also debug the solution directly in Office 365. I'll show that in a moment, but for now let's focus on the local workbench. So the way you debug in VS Code, is let's go to our source code. Let's go to hello web part.ts and let's go ahead and make sure that we have a…

Contents