|
1 | 1 | { |
| 2 | + /** |
| 3 | + * Prerequisite: install the Microsoft Edge or Chrome Debugger Extension for Visual Studio Code to debug your components with either |
| 4 | + * one of these browsers. See https://docs.microsoft.com/en-us/sharepoint/dev/spfx/debug-in-vscode#prerequisites for links |
| 5 | + */ |
2 | 6 | "version": "0.2.0", |
3 | 7 | "configurations": [ |
| 8 | + // Command sets cannot be served locally, so we need to use a remote server |
| 9 | + // { |
| 10 | + // "name": "Local serve (Edge)", |
| 11 | + // "type": "msedge", |
| 12 | + // "request": "launch", |
| 13 | + // "url": "https://localhost:4321/temp/workbench.html", |
| 14 | + // "webRoot": "${workspaceRoot}", |
| 15 | + // "sourceMaps": true, |
| 16 | + // "sourceMapPathOverrides": { |
| 17 | + // "webpack:///.././src/*": "${webRoot}/src/*", |
| 18 | + // "webpack:///../../../src/*": "${webRoot}/src/*", |
| 19 | + // "webpack:///../../../../src/*": "${webRoot}/src/*", |
| 20 | + // "webpack:///../../../../../src/*": "${webRoot}/src/*" |
| 21 | + // } |
| 22 | + // }, |
4 | 23 | { |
5 | | - "name": "Hosted workbench (Edge)", |
6 | | - "type": "pwa-msedge", |
| 24 | + "name": "Serve doclib command (Edge)", |
| 25 | + "type": "msedge", |
7 | 26 | "request": "launch", |
8 | | - "url": "https://{your_SharePoint_site_here}/_layouts/workbench.aspx", |
| 27 | + "url": "https://mkvj.sharepoint.com/sites/mkvj?debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/manifests.js", |
9 | 28 | "webRoot": "${workspaceRoot}", |
10 | 29 | "sourceMaps": true, |
11 | 30 | "sourceMapPathOverrides": { |
|
14 | 33 | "webpack:///../../../../src/*": "${webRoot}/src/*", |
15 | 34 | "webpack:///../../../../../src/*": "${webRoot}/src/*" |
16 | 35 | }, |
17 | | - "runtimeArgs": ["--remote-debugging-port=9222", "-incognito"], |
18 | | - "preLaunchTask": "gulp serve", |
19 | | - "postDebugTask": "Terminate All Tasks", |
| 36 | + // Source: https://www.codeproject.com/Articles/1236613/Set-Which-Chrome-Profile-for-Visual-Studio-to-Use |
| 37 | + "runtimeArgs": [ |
| 38 | + "--remote-debugging-port=9222", |
| 39 | + "--profile-directory='Profile 2'" // Change this to your preferred profile to open upon launching the browser |
| 40 | + //"-incognito" |
| 41 | + ], |
| 42 | + "preLaunchTask": "serve-doc-command", // See also: https://code.visualstudio.com/Docs/editor/tasks |
| 43 | + "postDebugTask": "terminate", |
20 | 44 | "presentation": { |
21 | 45 | "group": "remote", |
22 | 46 | "order": 1 |
23 | 47 | } |
24 | 48 | }, |
25 | 49 | { |
26 | | - "name": "Hosted workbench (Chrome)", |
27 | | - "type": "pwa-chrome", |
| 50 | + "name": "Serve custom list command (Edge)", |
| 51 | + "type": "msedge", |
28 | 52 | "request": "launch", |
29 | | - "url": "https://{your_SharePoint_site_here}/_layouts/workbench.aspx", |
| 53 | + "url": "https://mkvj.sharepoint.com/sites/mkvj?debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/manifests.js", |
30 | 54 | "webRoot": "${workspaceRoot}", |
31 | 55 | "sourceMaps": true, |
32 | 56 | "sourceMapPathOverrides": { |
|
35 | 59 | "webpack:///../../../../src/*": "${webRoot}/src/*", |
36 | 60 | "webpack:///../../../../../src/*": "${webRoot}/src/*" |
37 | 61 | }, |
38 | | - "runtimeArgs": ["--remote-debugging-port=9222", "-incognito"], |
39 | | - "preLaunchTask": "gulp serve", |
40 | | - "postDebugTask": "Terminate All Tasks", |
| 62 | + // Source: https://www.codeproject.com/Articles/1236613/Set-Which-Chrome-Profile-for-Visual-Studio-to-Use |
| 63 | + "runtimeArgs": [ |
| 64 | + "--remote-debugging-port=9222", |
| 65 | + "--profile-directory='Profile 2'" // Change this to your preferred profile to open upon launching the browser |
| 66 | + //"-incognito" |
| 67 | + ], |
| 68 | + "preLaunchTask": "serve-list-command", // See also: https://code.visualstudio.com/Docs/editor/tasks |
| 69 | + "postDebugTask": "terminate", |
41 | 70 | "presentation": { |
42 | 71 | "group": "remote", |
43 | | - "order": 2 |
| 72 | + "order": 1 |
| 73 | + } |
| 74 | + }, |
| 75 | + // Command sets cannot be served locally, so we need to use a remote server |
| 76 | + // { |
| 77 | + // "name": "Local serve (Chrome)", |
| 78 | + // "type": "chrome", |
| 79 | + // "request": "launch", |
| 80 | + // "url": "https://localhost:4321/temp/workbench.html", |
| 81 | + // "webRoot": "${workspaceRoot}", |
| 82 | + // "sourceMaps": true, |
| 83 | + // "sourceMapPathOverrides": { |
| 84 | + // "webpack:///.././src/*": "${webRoot}/src/*", |
| 85 | + // "webpack:///../../../src/*": "${webRoot}/src/*", |
| 86 | + // "webpack:///../../../../src/*": "${webRoot}/src/*", |
| 87 | + // "webpack:///../../../../../src/*": "${webRoot}/src/*" |
| 88 | + // }, |
| 89 | + // "runtimeArgs": ["--remote-debugging-port=9222"] |
| 90 | + // }, |
| 91 | + { |
| 92 | + "name": "Serve doclib command (Chrome)", |
| 93 | + "type": "chrome", |
| 94 | + "request": "launch", |
| 95 | + "url": "https://{YOUR_TENANT}.sharepoint.com/sites/{YOUR_SITE}?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js", |
| 96 | + "webRoot": "${workspaceRoot}", |
| 97 | + "sourceMaps": true, |
| 98 | + "sourceMapPathOverrides": { |
| 99 | + "webpack:///.././src/*": "${webRoot}/src/*", |
| 100 | + "webpack:///../../../src/*": "${webRoot}/src/*", |
| 101 | + "webpack:///../../../../src/*": "${webRoot}/src/*", |
| 102 | + "webpack:///../../../../../src/*": "${webRoot}/src/*" |
| 103 | + }, |
| 104 | + // Source: https://www.codeproject.com/Articles/1236613/Set-Which-Chrome-Profile-for-Visual-Studio-to-Use |
| 105 | + "runtimeArgs": [ |
| 106 | + "--remote-debugging-port=9222", |
| 107 | + "--profile-directory='Profile 2'" // Change this to your preferred profile to open upon launching the browser |
| 108 | + //"-incognito" |
| 109 | + ], |
| 110 | + "preLaunchTask": "serve-doc-command", // See also: https://code.visualstudio.com/Docs/editor/tasks |
| 111 | + "postDebugTask": "terminate", |
| 112 | + "presentation": { |
| 113 | + "group": "remote", |
| 114 | + "order": 1 |
| 115 | + } |
| 116 | + }, |
| 117 | + { |
| 118 | + "name": "Serve custom list command (Chrome)", |
| 119 | + "type": "chrome", |
| 120 | + "request": "launch", |
| 121 | + "url": "https://{YOUR_TENANT}.sharepoint.com/sites/{YOUR_SITE}?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js", |
| 122 | + "webRoot": "${workspaceRoot}", |
| 123 | + "sourceMaps": true, |
| 124 | + "sourceMapPathOverrides": { |
| 125 | + "webpack:///.././src/*": "${webRoot}/src/*", |
| 126 | + "webpack:///../../../src/*": "${webRoot}/src/*", |
| 127 | + "webpack:///../../../../src/*": "${webRoot}/src/*", |
| 128 | + "webpack:///../../../../../src/*": "${webRoot}/src/*" |
| 129 | + }, |
| 130 | + // Source: https://www.codeproject.com/Articles/1236613/Set-Which-Chrome-Profile-for-Visual-Studio-to-Use |
| 131 | + "runtimeArgs": [ |
| 132 | + "--remote-debugging-port=9222", |
| 133 | + "--profile-directory='Profile 2'" // Change this to your preferred profile to open upon launching the browser |
| 134 | + //"-incognito" |
| 135 | + ], |
| 136 | + "preLaunchTask": "serve-list-command", // See also: https://code.visualstudio.com/Docs/editor/tasks |
| 137 | + "postDebugTask": "terminate", |
| 138 | + "presentation": { |
| 139 | + "group": "remote", |
| 140 | + "order": 1 |
44 | 141 | } |
45 | 142 | } |
46 | 143 | ] |
|
0 commit comments