sp-dev-fx-webparts/samples/react-ioc-tests/vscode/launch.json

73 lines
2.4 KiB
JSON

{
/**
* Install Chrome Debugger Extension for Visual Studio Code to debug your components with the
* Chrome browser: https://aka.ms/spfx-debugger-extensions
*/
"version": "0.2.0",
"configurations": [{
"name": "Local workbench",
"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/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222"
]
},
{
"name": "Hosted workbench",
"type": "chrome",
"request": "launch",
"url": "https://enter-your-SharePoint-site/_layouts/workbench.aspx",
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///.././src/*": "${webRoot}/src/*",
"webpack:///../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../src/*": "${webRoot}/src/*",
"webpack:///../../../../../src/*": "${webRoot}/src/*"
},
"runtimeArgs": [
"--remote-debugging-port=9222",
"-incognito"
]
},
//https://github.com/Microsoft/vscode-recipes/tree/master/debugging-jest-tests
//https://github.com/facebook/jest/issues/1652
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Jest Watch",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["--runInBand","--watch"], // jest --watch #runs jest -o by default
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
//https://facebook.github.io/jest/docs/en/cli.html
"type": "node",
"request": "launch",
"name": "Jest Watch All",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["--runInBand","--watchAll"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}