Contents
How do I open SPFx project in Visual Studio code?
You can directly open your SPFx project in VS Code. You can always use the File->Open and then open the project folder, or if you are already on a console, then you can just type the following to open the project. VS Code supports launching from the command line which is very handy and works in all platforms. code .
Here are the steps to debug a web part in SharePoint.
- Open the project and set appropriate breakpoints.
- Create a Web Part page on the default SharePoint site.
- Add the Web Part to the page.
- Attach the debugger to the W3wp. In the Debug menu in Visual Studio . NET, click “Processes”.
How to debug SharePoint framework in VS Code?
From the main menu, click Debug > Start Debugging. From left menu, click Debug and start debugging by clicking green arrow. Follow the below steps to debug on real SharePoint site. From VS Code open launch.json under .vscode folder. In the hosted workbench configuration, type your SharePoint online site address for URL property.
Using the local workbench is convenient for testing all scenarios that do not require communicating with SharePoint as well as for offline development. With Visual Studio Code configured for debugging SharePoint Framework solutions by using Google Chrome and the local workbench, you can verify that everything is working as expected.
How to start debugging in Visual Studio Code?
In Visual Studio Code, activate the Debug pane, and in the Configurations list, select the newly added Hosted workbench configuration. Start debugging either by selecting F5 or by selecting the Start Debugging option on the Debug menu.
Can You debug VS Code with SPFX framework?
SPFx solutions can be easily debugged in VS Code using debugger extensions. This gives comfort in developing, testing and debugging the SPFx solution from same IDE.