microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
advancedclientconfig

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.vscode/launch.json

169lines · 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": "launch",
26 "name": "Debug Current Test File",
27 "autoAttachChildProcesses": true,
28 "skipFiles": ["<node_internals>/**", "**/node_modules/**"],
29 "program": "${workspaceRoot}/packages/compiler/node_modules/vitest/vitest.mjs",
30 "args": ["run", "${relativeFile}"],
31 "smartStep": true
32 },
33 {
34 "name": "Attach to Language Server",
35 "type": "node",
36 "request": "attach",
37 "port": 4242,
38 "restart": {
39 "delay": 100,
40 "maxAttempts": 10
41 },
42 "continueOnAttach": true,
43 "smartStep": true,
44 "sourceMaps": true,
45 "skipFiles": ["<node_internals>/**/*.js"],
46 "outFiles": [
47 "${workspaceFolder}/packages/*/dist/**/*.js",
48 "${workspaceFolder}/packages/*/dist-dev/**/*.js"
49 ],
50 "timeout": 60000,
51 "presentation": {
52 "order": 999
53 }
54 },
55 {
56 "type": "node",
57 "request": "launch",
58 "name": "Compile Scratch",
59 "program": "${workspaceFolder}/packages/compiler/entrypoints/cli.js",
60 "args": [
61 "compile",
62 "../samples/scratch",
63 "--output-dir=temp/scratch-output",
64 "--emit=@typespec/openapi3"
65 ],
66 "smartStep": true,
67 "sourceMaps": true,
68 "skipFiles": ["<node_internals>/**/*.js"],
69 "outFiles": [
70 "${workspaceFolder}/packages/*/dist/**/*.js",
71 "${workspaceFolder}/packages/*/dist-dev/**/*.js"
72 ],
73 "cwd": "${workspaceFolder}/packages/compiler",
74 "presentation": {
75 "order": 2
76 }
77 },
78 {
79 "type": "node",
80 "request": "launch",
81 "name": "Compile Scratch (nostdlib)",
82 "program": "${workspaceFolder}/packages/compiler/entrypoints/cli.js",
83 "args": ["compile", "../samples/scratch", "--output-dir=temp/scratch-output", "--nostdlib"],
84 "smartStep": true,
85 "sourceMaps": true,
86 "skipFiles": ["<node_internals>/**/*.js"],
87 "outFiles": [
88 "${workspaceFolder}/packages/*/dist/**/*.js",
89 "${workspaceFolder}/packages/*/dist-dev/**/*.js"
90 ],
91 "cwd": "${workspaceFolder}/packages/compiler",
92 "presentation": {
93 "order": 2
94 }
95 },
96 {
97 "name": "Regenerate .tmlanguage",
98 "type": "node",
99 "program": "${workspaceFolder}/packages/typespec-vscode/scripts/generate-tmlanguage.js",
100 "request": "launch",
101 "cwd": "${workspaceFolder}/packages/typespec-vscode",
102 "presentation": {
103 "order": 999
104 }
105 },
106 {
107 "name": "VS Code Extension (Client)",
108 "type": "extensionHost",
109 "request": "launch",
110 "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode"],
111 "outFiles": ["${workspaceFolder}/packages/typespec-vscode/dist/**/*.cjs"],
112 "env": {
113 // Log elapsed time for each call to server.
114 //"TYPESPEC_SERVER_LOG_TIMING": "true",
115
116 // Save .cpuprofile for last run of each server function here
117 // NOTE: This will add a lot of lag so don't trust logged timing if also enabled above.
118 //"TYPESPEC_SERVER_PROFILE_DIR": "${workspaceRoot}/temp",
119
120 // Use empty node options and don't debug while profiling to get the most accurate timing
121 //"TYPESPEC_SERVER_NODE_OPTIONS": "",
122
123 "TYPESPEC_SERVER_NODE_OPTIONS": "--nolazy --inspect-brk=4242",
124 "TYPESPEC_DEVELOPMENT_MODE": "true"
125 },
126 "presentation": {
127 "hidden": true
128 }
129 },
130 {
131 "type": "node",
132 "request": "launch",
133 "name": "Debug TypeSpec Migrate",
134 "program": "${workspaceFolder}/packages/migrate/dist/src/cli.js",
135 "smartStep": true,
136 "sourceMaps": true,
137 "skipFiles": ["<node_internals>/**/*.js"]
138 },
139 {
140 "type": "node",
141 "request": "launch",
142 "name": "Debug Docs Generation",
143 "program": "${workspaceFolder}/packages/website/.scripts/regen-ref-docs.mjs",
144 "smartStep": true,
145 "sourceMaps": true,
146 "skipFiles": ["<node_internals>/**/*.js"]
147 },
148 {
149 "name": "Run Web Extension in VS Code",
150 "type": "extensionHost",
151 "debugWebWorkerHost": true,
152 "request": "launch",
153 "args": [
154 "--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode",
155 "--extensionDevelopmentKind=web"
156 ],
157 "outFiles": ["${workspaceFolder}/dist/src/web/**/*.js"]
158 }
159 ],
160 "compounds": [
161 {
162 "name": "VS Code Extension",
163 "configurations": ["VS Code Extension (Client)", "Attach to Language Server"],
164 "presentation": {
165 "order": 1
166 }
167 }
168 ]
169}
170