Last active
May 15, 2017 22:03
Star
You must be signed in to star a gist
revision 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Chrome browser to debug SharePoint Framework React webpart with Visual Studio Code on Windows | |
// - Install "Debugger for Chrome" extension | |
// - Add this configuration to the launch.json | |
// - Close all Chrome browser active instances | |
// - Start the SPFx nodejs server by executing "gulp serve" | |
// - Go to VS Code debug view (top menu -> View -> Debug) | |
// - Hit the play (start debugging) button | |
// Happy debugging! | |
// Full guides | |
// http://blog.velingeorgiev.pro/how-debug-sharepoint-framework-webpart-visual-studio-code | |
// https://dev.office.com/sharepoint/docs/spfx/debug-in-vscode | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "SPFx Local", | |
"type": "chrome", | |
"request": "launch", | |
"url": "https://localhost:4321/temp/workbench.html", | |
"webRoot": "${workspaceRoot}", | |
"sourceMaps": true, | |
"sourceMapPathOverrides": { | |
"webpack:///../../../src/*": "${webRoot}/src/*", | |
"webpack:///../../../../src/*": "${webRoot}/src/*", | |
"webpack:///../../../../../src/*": "${webRoot}/src/*" | |
}, | |
"runtimeArgs": [ | |
"--remote-debugging-port=9222" | |
] | |
}, | |
{ | |
"name": "SPFx Online", | |
"type": "chrome", | |
"request": "launch", | |
"url": "https://<your_tenant>.sharepoint.com/sites/<your_site>/SitePages/<your_webpart_page>.aspx", | |
"webRoot": "${workspaceRoot}", | |
"sourceMaps": true, | |
"sourceMapPathOverrides": { | |
"webpack:///../../../src/*": "${webRoot}/src/*", | |
"webpack:///../../../../src/*": "${webRoot}/src/*", | |
"webpack:///../../../../../src/*": "${webRoot}/src/*" | |
}, | |
"runtimeArgs": [ | |
"--remote-debugging-port=9222" | |
] | |
}, | |
{ | |
"name": "SPFx Online Workbench", | |
"type": "chrome", | |
"request": "launch", | |
"url": "https://<your_tenant>.sharepoint.com/_layouts/workbench.aspx", | |
"webRoot": "${workspaceRoot}", | |
"sourceMaps": true, | |
"sourceMapPathOverrides": { | |
"webpack:///../../../src/*": "${webRoot}/src/*", | |
"webpack:///../../../../src/*": "${webRoot}/src/*", | |
"webpack:///../../../../../src/*": "${webRoot}/src/*" | |
}, | |
"runtimeArgs": [ | |
"--remote-debugging-port=9222" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment