2021-08-25 22:47:06 +03:00
|
|
|
{
|
|
|
|
// Use IntelliSense to learn about possible attributes.
|
|
|
|
// Hover to view descriptions of existing attributes.
|
|
|
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
|
|
"version": "0.2.0",
|
|
|
|
"configurations": [
|
|
|
|
{
|
2022-10-20 18:18:29 +03:00
|
|
|
"type": "node",
|
2021-08-25 22:47:06 +03:00
|
|
|
"request": "attach",
|
|
|
|
"name": "Attach to Default Port",
|
|
|
|
"port": 9229,
|
|
|
|
"smartStep": true,
|
|
|
|
"sourceMaps": true,
|
|
|
|
"skipFiles": ["<node_internals>/**/*.js"],
|
|
|
|
"outFiles": [
|
|
|
|
"${workspaceFolder}/packages/*/dist/**/*.js",
|
|
|
|
"${workspaceFolder}/packages/*/dist-dev/**/*.js"
|
|
|
|
],
|
|
|
|
"presentation": {
|
|
|
|
"order": 999
|
|
|
|
}
|
|
|
|
},
|
2024-01-22 20:56:55 +03:00
|
|
|
{
|
|
|
|
"type": "node",
|
|
|
|
"request": "launch",
|
|
|
|
"name": "Debug Current Test File",
|
|
|
|
"autoAttachChildProcesses": true,
|
|
|
|
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
|
|
|
|
"program": "${workspaceRoot}/packages/compiler/node_modules/vitest/vitest.mjs",
|
|
|
|
"args": ["run", "${relativeFile}"],
|
|
|
|
"smartStep": true
|
|
|
|
},
|
2021-08-25 22:47:06 +03:00
|
|
|
{
|
|
|
|
"name": "Attach to Language Server",
|
2022-10-20 18:18:29 +03:00
|
|
|
"type": "node",
|
2021-08-25 22:47:06 +03:00
|
|
|
"request": "attach",
|
|
|
|
"port": 4242,
|
|
|
|
"restart": {
|
|
|
|
"delay": 100,
|
|
|
|
"maxAttempts": 10
|
|
|
|
},
|
|
|
|
"continueOnAttach": true,
|
|
|
|
"smartStep": true,
|
|
|
|
"sourceMaps": true,
|
|
|
|
"skipFiles": ["<node_internals>/**/*.js"],
|
|
|
|
"outFiles": [
|
|
|
|
"${workspaceFolder}/packages/*/dist/**/*.js",
|
|
|
|
"${workspaceFolder}/packages/*/dist-dev/**/*.js"
|
|
|
|
],
|
|
|
|
"timeout": 60000,
|
|
|
|
"presentation": {
|
|
|
|
"order": 999
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2022-10-20 18:18:29 +03:00
|
|
|
"type": "node",
|
2021-08-25 22:47:06 +03:00
|
|
|
"request": "launch",
|
|
|
|
"name": "Compile Scratch",
|
2023-06-13 23:57:29 +03:00
|
|
|
"program": "${workspaceFolder}/packages/compiler/entrypoints/cli.js",
|
2022-06-08 02:06:06 +03:00
|
|
|
"args": [
|
|
|
|
"compile",
|
|
|
|
"../samples/scratch",
|
2022-10-11 20:25:19 +03:00
|
|
|
"--output-dir=temp/scratch-output",
|
2023-02-16 01:37:39 +03:00
|
|
|
"--emit=@typespec/openapi3"
|
2022-06-08 02:06:06 +03:00
|
|
|
],
|
2021-08-25 22:47:06 +03:00
|
|
|
"smartStep": true,
|
|
|
|
"sourceMaps": true,
|
|
|
|
"skipFiles": ["<node_internals>/**/*.js"],
|
|
|
|
"outFiles": [
|
|
|
|
"${workspaceFolder}/packages/*/dist/**/*.js",
|
|
|
|
"${workspaceFolder}/packages/*/dist-dev/**/*.js"
|
|
|
|
],
|
2022-08-20 00:23:23 +03:00
|
|
|
"cwd": "${workspaceFolder}/packages/compiler",
|
2021-08-25 22:47:06 +03:00
|
|
|
"presentation": {
|
|
|
|
"order": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2022-10-20 18:18:29 +03:00
|
|
|
"type": "node",
|
2021-08-25 22:47:06 +03:00
|
|
|
"request": "launch",
|
|
|
|
"name": "Compile Scratch (nostdlib)",
|
2023-06-13 23:57:29 +03:00
|
|
|
"program": "${workspaceFolder}/packages/compiler/entrypoints/cli.js",
|
2022-10-11 20:25:19 +03:00
|
|
|
"args": ["compile", "../samples/scratch", "--output-dir=temp/scratch-output", "--nostdlib"],
|
2021-08-25 22:47:06 +03:00
|
|
|
"smartStep": true,
|
|
|
|
"sourceMaps": true,
|
|
|
|
"skipFiles": ["<node_internals>/**/*.js"],
|
|
|
|
"outFiles": [
|
|
|
|
"${workspaceFolder}/packages/*/dist/**/*.js",
|
|
|
|
"${workspaceFolder}/packages/*/dist-dev/**/*.js"
|
|
|
|
],
|
2022-08-20 00:23:23 +03:00
|
|
|
"cwd": "${workspaceFolder}/packages/compiler",
|
2021-08-25 22:47:06 +03:00
|
|
|
"presentation": {
|
|
|
|
"order": 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Regenerate .tmlanguage",
|
2022-10-20 18:18:29 +03:00
|
|
|
"type": "node",
|
2023-02-16 01:37:39 +03:00
|
|
|
"program": "${workspaceFolder}/packages/typespec-vscode/scripts/generate-tmlanguage.js",
|
2021-08-25 22:47:06 +03:00
|
|
|
"request": "launch",
|
2023-02-16 01:37:39 +03:00
|
|
|
"cwd": "${workspaceFolder}/packages/typespec-vscode",
|
2021-08-25 22:47:06 +03:00
|
|
|
"presentation": {
|
|
|
|
"order": 999
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "VS Code Extension (Client)",
|
|
|
|
"type": "extensionHost",
|
|
|
|
"request": "launch",
|
2023-02-16 01:37:39 +03:00
|
|
|
"args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode"],
|
2024-06-07 16:49:57 +03:00
|
|
|
"outFiles": ["${workspaceFolder}/packages/typespec-vscode/dist/**/*.cjs"],
|
2021-08-25 22:47:06 +03:00
|
|
|
"env": {
|
2022-08-24 17:36:05 +03:00
|
|
|
// Log elapsed time for each call to server.
|
2023-02-16 01:37:39 +03:00
|
|
|
//"TYPESPEC_SERVER_LOG_TIMING": "true",
|
2022-08-24 17:36:05 +03:00
|
|
|
|
|
|
|
// Save .cpuprofile for last run of each server function here
|
|
|
|
// NOTE: This will add a lot of lag so don't trust logged timing if also enabled above.
|
2023-02-16 01:37:39 +03:00
|
|
|
//"TYPESPEC_SERVER_PROFILE_DIR": "${workspaceRoot}/temp",
|
2022-08-24 17:36:05 +03:00
|
|
|
|
|
|
|
// Use empty node options and don't debug while profiling to get the most accurate timing
|
2023-02-16 01:37:39 +03:00
|
|
|
//"TYPESPEC_SERVER_NODE_OPTIONS": "",
|
2022-08-24 17:36:05 +03:00
|
|
|
|
2023-02-16 01:37:39 +03:00
|
|
|
"TYPESPEC_SERVER_NODE_OPTIONS": "--nolazy --inspect-brk=4242",
|
|
|
|
"TYPESPEC_DEVELOPMENT_MODE": "true"
|
2021-08-25 22:47:06 +03:00
|
|
|
},
|
|
|
|
"presentation": {
|
|
|
|
"hidden": true
|
|
|
|
}
|
2023-03-11 00:56:46 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "node",
|
|
|
|
"request": "launch",
|
|
|
|
"name": "Debug TypeSpec Migrate",
|
|
|
|
"program": "${workspaceFolder}/packages/migrate/dist/src/cli.js",
|
|
|
|
"smartStep": true,
|
|
|
|
"sourceMaps": true,
|
2023-07-22 01:34:36 +03:00
|
|
|
"skipFiles": ["<node_internals>/**/*.js"]
|
2023-04-28 19:32:54 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "node",
|
|
|
|
"request": "launch",
|
|
|
|
"name": "Debug Docs Generation",
|
|
|
|
"program": "${workspaceFolder}/packages/website/.scripts/regen-ref-docs.mjs",
|
|
|
|
"smartStep": true,
|
|
|
|
"sourceMaps": true,
|
|
|
|
"skipFiles": ["<node_internals>/**/*.js"]
|
2024-09-25 20:09:01 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Run Web Extension in VS Code",
|
|
|
|
"type": "extensionHost",
|
|
|
|
"debugWebWorkerHost": true,
|
|
|
|
"request": "launch",
|
2024-09-26 01:35:38 +03:00
|
|
|
"args": [
|
|
|
|
"--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode",
|
|
|
|
"--extensionDevelopmentKind=web"
|
|
|
|
],
|
2024-09-25 20:09:01 +03:00
|
|
|
"outFiles": ["${workspaceFolder}/dist/src/web/**/*.js"]
|
2021-08-25 22:47:06 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"compounds": [
|
|
|
|
{
|
|
|
|
"name": "VS Code Extension",
|
|
|
|
"configurations": ["VS Code Extension (Client)", "Attach to Language Server"],
|
|
|
|
"presentation": {
|
|
|
|
"order": 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|