|
| 1 | +{ |
| 2 | + "version": "0.2.0", |
| 3 | + "configurations": [ |
| 4 | + { |
| 5 | + "type": "node", |
| 6 | + "request": "launch", |
| 7 | + "name": "Debug CLI", |
| 8 | + "program": "${workspaceFolder}/src/cli/cli.ts", |
| 9 | + "outFiles": ["${workspaceFolder}/build/main/**/*.js"], |
| 10 | + "skipFiles": [ |
| 11 | + "<node_internals>/**/*.js", |
| 12 | + "${workspaceFolder}/node_modules/**/*.js" |
| 13 | + ], |
| 14 | + "preLaunchTask": "npm: build", |
| 15 | + "stopOnEntry": true, |
| 16 | + "smartStep": true, |
| 17 | + "runtimeArgs": ["--nolazy"], |
| 18 | + "env": { |
| 19 | + "TYPESCRIPT_STARTER_REPO_URL": "${workspaceFolder}" |
| 20 | + }, |
| 21 | + "console": "externalTerminal" |
| 22 | + }, |
| 23 | + { |
| 24 | + /// Usage: set appropriate breakpoints in a *.spec.ts file, then open the |
| 25 | + // respective *.spec.js file to run this task. Once a breakpoint is hit, |
| 26 | + // the debugger will open the source *.spec.ts file for debugging. |
| 27 | + "type": "node", |
| 28 | + "request": "launch", |
| 29 | + "name": "Debug Compiled Test File", |
| 30 | + "program": "${workspaceFolder}/node_modules/ava/profile.js", |
| 31 | + "args": [ |
| 32 | + "${file}" |
| 33 | + // TODO: VSCode's launch.json variable substitution |
| 34 | + // (https://code.visualstudio.com/docs/editor/variables-reference) |
| 35 | + // doesn't quite allow us to go from: |
| 36 | + // `./src/path/to/file.ts` to `./build/main/path/to/file.js` |
| 37 | + // so the user has to navigate to the compiled file manually. (Close:) |
| 38 | + // "${workspaceFolder}/build/main/lib/${fileBasenameNoExtension}.js" |
| 39 | + ], |
| 40 | + "skipFiles": ["<node_internals>/**/*.js"], |
| 41 | + // Consider using `npm run watch` or `yarn watch` for faster debugging |
| 42 | + // "preLaunchTask": "npm: build", |
| 43 | + // "smartStep": true, |
| 44 | + "runtimeArgs": ["--nolazy"] |
| 45 | + } |
| 46 | + // TODO: Simpler test debugging option. Discussion: |
| 47 | + // https://github.com/avajs/ava/issues/1505#issuecomment-370654427 |
| 48 | + // { |
| 49 | + // "type": "node", |
| 50 | + // "request": "launch", |
| 51 | + // "name": "Debug Current Test File", |
| 52 | + // "program": "${file}", |
| 53 | + // "outFiles": ["${workspaceFolder}/build/main/**/*.js"], |
| 54 | + // "skipFiles": ["<node_internals>/**/*.js"], |
| 55 | + // // Consider using `npm run watch` or `yarn watch` for faster debugging |
| 56 | + // // "preLaunchTask": "npm: build", |
| 57 | + // // "stopOnEntry": true, |
| 58 | + // // "smartStep": true, |
| 59 | + // "runtimeArgs": ["--nolazy"], |
| 60 | + // "env": { |
| 61 | + // "AVA_DEBUG_MODE": "1" |
| 62 | + // } |
| 63 | + // } |
| 64 | + ] |
| 65 | +} |
0 commit comments