microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
.vscode/launch.json
167lines · modecode
| 1 | { |
| 2 | // Use IntelliSense to learn about possible attributes. |
| 3 | // Hover to view descriptions of existing attributes. |
| 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
| 5 | "version": "0.2.0", |
| 6 | "configurations": [ |
| 7 | { |
| 8 | "type": "node", |
| 9 | "request": "attach", |
| 10 | "name": "Attach to Default Port", |
| 11 | "port": 9229, |
| 12 | "smartStep": true, |
| 13 | "sourceMaps": true, |
| 14 | "skipFiles": ["<node_internals>/**/*.js"], |
| 15 | "outFiles": [ |
| 16 | "${workspaceFolder}/packages/*/dist/**/*.js", |
| 17 | "${workspaceFolder}/packages/*/dist-dev/**/*.js" |
| 18 | ], |
| 19 | "presentation": { |
| 20 | "order": 999 |
| 21 | } |
| 22 | }, |
| 23 | { |
| 24 | "type": "node", |
| 25 | "request": "attach", |
| 26 | "name": "Tests", |
| 27 | "port": 9229, |
| 28 | "smartStep": true, |
| 29 | "sourceMaps": true, |
| 30 | "continueOnAttach": true, |
| 31 | "skipFiles": [ |
| 32 | "<node_internals>/**/*.js", |
| 33 | "**/.vscode/extensions/hbenl.vscode-mocha-test-adapter-*/**.js" |
| 34 | ], |
| 35 | "outFiles": [ |
| 36 | "${workspaceFolder}/packages/*/dist/**/*.js", |
| 37 | "${workspaceFolder}/packages/*/dist-dev/**/*.js" |
| 38 | ], |
| 39 | "presentation": { |
| 40 | "hidden": true |
| 41 | } |
| 42 | }, |
| 43 | { |
| 44 | "name": "Attach to Language Server", |
| 45 | "type": "node", |
| 46 | "request": "attach", |
| 47 | "port": 4242, |
| 48 | "restart": { |
| 49 | "delay": 100, |
| 50 | "maxAttempts": 10 |
| 51 | }, |
| 52 | "continueOnAttach": true, |
| 53 | "smartStep": true, |
| 54 | "sourceMaps": true, |
| 55 | "skipFiles": ["<node_internals>/**/*.js"], |
| 56 | "outFiles": [ |
| 57 | "${workspaceFolder}/packages/*/dist/**/*.js", |
| 58 | "${workspaceFolder}/packages/*/dist-dev/**/*.js" |
| 59 | ], |
| 60 | "timeout": 60000, |
| 61 | "presentation": { |
| 62 | "order": 999 |
| 63 | } |
| 64 | }, |
| 65 | { |
| 66 | "type": "node", |
| 67 | "request": "launch", |
| 68 | "name": "Compile Scratch", |
| 69 | "program": "${workspaceFolder}/packages/compiler/entrypoints/cli.js", |
| 70 | "args": [ |
| 71 | "compile", |
| 72 | "../samples/scratch", |
| 73 | "--output-dir=temp/scratch-output", |
| 74 | "--emit=@typespec/openapi3" |
| 75 | ], |
| 76 | "smartStep": true, |
| 77 | "sourceMaps": true, |
| 78 | "skipFiles": ["<node_internals>/**/*.js"], |
| 79 | "outFiles": [ |
| 80 | "${workspaceFolder}/packages/*/dist/**/*.js", |
| 81 | "${workspaceFolder}/packages/*/dist-dev/**/*.js" |
| 82 | ], |
| 83 | "cwd": "${workspaceFolder}/packages/compiler", |
| 84 | "presentation": { |
| 85 | "order": 2 |
| 86 | } |
| 87 | }, |
| 88 | { |
| 89 | "type": "node", |
| 90 | "request": "launch", |
| 91 | "name": "Compile Scratch (nostdlib)", |
| 92 | "program": "${workspaceFolder}/packages/compiler/entrypoints/cli.js", |
| 93 | "args": ["compile", "../samples/scratch", "--output-dir=temp/scratch-output", "--nostdlib"], |
| 94 | "smartStep": true, |
| 95 | "sourceMaps": true, |
| 96 | "skipFiles": ["<node_internals>/**/*.js"], |
| 97 | "outFiles": [ |
| 98 | "${workspaceFolder}/packages/*/dist/**/*.js", |
| 99 | "${workspaceFolder}/packages/*/dist-dev/**/*.js" |
| 100 | ], |
| 101 | "cwd": "${workspaceFolder}/packages/compiler", |
| 102 | "presentation": { |
| 103 | "order": 2 |
| 104 | } |
| 105 | }, |
| 106 | { |
| 107 | "name": "Regenerate .tmlanguage", |
| 108 | "type": "node", |
| 109 | "program": "${workspaceFolder}/packages/typespec-vscode/scripts/generate-tmlanguage.js", |
| 110 | "request": "launch", |
| 111 | "cwd": "${workspaceFolder}/packages/typespec-vscode", |
| 112 | "presentation": { |
| 113 | "order": 999 |
| 114 | } |
| 115 | }, |
| 116 | { |
| 117 | "name": "VS Code Extension (Client)", |
| 118 | "type": "extensionHost", |
| 119 | "request": "launch", |
| 120 | "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode"], |
| 121 | "env": { |
| 122 | // Log elapsed time for each call to server. |
| 123 | //"TYPESPEC_SERVER_LOG_TIMING": "true", |
| 124 | |
| 125 | // Save .cpuprofile for last run of each server function here |
| 126 | // NOTE: This will add a lot of lag so don't trust logged timing if also enabled above. |
| 127 | //"TYPESPEC_SERVER_PROFILE_DIR": "${workspaceRoot}/temp", |
| 128 | |
| 129 | // Use empty node options and don't debug while profiling to get the most accurate timing |
| 130 | //"TYPESPEC_SERVER_NODE_OPTIONS": "", |
| 131 | |
| 132 | "TYPESPEC_SERVER_NODE_OPTIONS": "--nolazy --inspect-brk=4242", |
| 133 | "TYPESPEC_DEVELOPMENT_MODE": "true" |
| 134 | }, |
| 135 | "presentation": { |
| 136 | "hidden": true |
| 137 | } |
| 138 | }, |
| 139 | { |
| 140 | "type": "node", |
| 141 | "request": "launch", |
| 142 | "name": "Debug TypeSpec Migrate", |
| 143 | "program": "${workspaceFolder}/packages/migrate/dist/src/cli.js", |
| 144 | "smartStep": true, |
| 145 | "sourceMaps": true, |
| 146 | "skipFiles": ["<node_internals>/**/*.js"] |
| 147 | }, |
| 148 | { |
| 149 | "type": "node", |
| 150 | "request": "launch", |
| 151 | "name": "Debug Docs Generation", |
| 152 | "program": "${workspaceFolder}/packages/website/.scripts/regen-ref-docs.mjs", |
| 153 | "smartStep": true, |
| 154 | "sourceMaps": true, |
| 155 | "skipFiles": ["<node_internals>/**/*.js"] |
| 156 | } |
| 157 | ], |
| 158 | "compounds": [ |
| 159 | { |
| 160 | "name": "VS Code Extension", |
| 161 | "configurations": ["VS Code Extension (Client)", "Attach to Language Server"], |
| 162 | "presentation": { |
| 163 | "order": 1 |
| 164 | } |
| 165 | } |
| 166 | ] |
| 167 | } |
| 168 | |