|
70 | 70 | "copilot-debugger.serverReadyEnabled": { |
71 | 71 | "type": "boolean", |
72 | 72 | "default": true, |
73 | | - "description": "Enable serverReady automation (trigger + action). When disabled, provided serverReady payloads are ignored." |
| 73 | + "description": "Enable serverReady automation (trigger + action). When disabled, provided serverReady payloads are ignored." |
74 | 74 | }, |
75 | 75 | "copilot-debugger.serverReadyDefaultActionType": { |
76 | 76 | "type": "string", |
77 | | - "enum": ["httpRequest", "shellCommand", "vscodeCommand"], |
| 77 | + "enum": [ |
| 78 | + "httpRequest", |
| 79 | + "shellCommand", |
| 80 | + "vscodeCommand" |
| 81 | + ], |
78 | 82 | "default": "httpRequest", |
79 | 83 | "description": "Preferred serverReady action type surfaced in samples and quick insert command." |
80 | 84 | } |
|
144 | 148 | "logMessage": { |
145 | 149 | "type": "string", |
146 | 150 | "description": "Optional log message for logpoint or capture action. Uses curly braces for variable interpolation (e.g., 'Value is {x}'). If action=capture, interpolated messages are returned as capturedLogMessages." |
147 | | - }, |
148 | | - "reasonCode": { |
149 | | - "type": "string", |
150 | | - "description": "Internal telemetry-friendly reason/tag (not surfaced in UI)." |
| 151 | + }, |
| 152 | + "reasonCode": { |
| 153 | + "type": "string", |
| 154 | + "description": "Internal telemetry-friendly reason/tag (not surfaced in UI)." |
151 | 155 | } |
152 | 156 | }, |
153 | 157 | "required": [ |
|
167 | 171 | "type": "object", |
168 | 172 | "description": "Readiness trigger. Provide either path+line for breakpoint or pattern for output-based readiness. Omit entirely for immediate attach execution.", |
169 | 173 | "properties": { |
170 | | - "path": { "type": "string", "description": "Breakpoint file path (relative or absolute)." }, |
171 | | - "line": { "type": "integer", "description": "1-based line number for breakpoint trigger." }, |
172 | | - "pattern": { "type": "string", "description": "Regex pattern matched against debug/task output for readiness." } |
| 174 | + "path": { |
| 175 | + "type": "string", |
| 176 | + "description": "Breakpoint file path (relative or absolute)." |
| 177 | + }, |
| 178 | + "line": { |
| 179 | + "type": "integer", |
| 180 | + "description": "1-based line number for breakpoint trigger." |
| 181 | + }, |
| 182 | + "pattern": { |
| 183 | + "type": "string", |
| 184 | + "description": "Regex pattern matched against debug/task output for readiness." |
| 185 | + } |
173 | 186 | } |
174 | 187 | }, |
175 | 188 | "action": { |
|
178 | 191 | "properties": { |
179 | 192 | "type": { |
180 | 193 | "type": "string", |
181 | | - "enum": ["httpRequest", "shellCommand", "vscodeCommand"], |
| 194 | + "enum": [ |
| 195 | + "httpRequest", |
| 196 | + "shellCommand", |
| 197 | + "vscodeCommand" |
| 198 | + ], |
182 | 199 | "description": "Action type discriminator." |
183 | 200 | }, |
184 | | - "url": { "type": "string", "description": "Target URL (httpRequest)." }, |
185 | | - "method": { "type": "string", "description": "HTTP method (default GET)." }, |
186 | | - "headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Optional HTTP headers." }, |
187 | | - "body": { "type": "string", "description": "Optional HTTP request body." }, |
188 | | - "shellCommand": { "type": "string", "description": "Shell command executed in a new terminal (shellCommand)." }, |
189 | | - "command": { "type": "string", "description": "VS Code command ID (vscodeCommand)." }, |
190 | | - "args": { "type": "array", "description": "Optional VS Code command arguments." } |
| 201 | + "url": { |
| 202 | + "type": "string", |
| 203 | + "description": "Target URL (httpRequest)." |
| 204 | + }, |
| 205 | + "method": { |
| 206 | + "type": "string", |
| 207 | + "description": "HTTP method (default GET)." |
| 208 | + }, |
| 209 | + "headers": { |
| 210 | + "type": "object", |
| 211 | + "additionalProperties": { |
| 212 | + "type": "string" |
| 213 | + }, |
| 214 | + "description": "Optional HTTP headers." |
| 215 | + }, |
| 216 | + "body": { |
| 217 | + "type": "string", |
| 218 | + "description": "Optional HTTP request body." |
| 219 | + }, |
| 220 | + "shellCommand": { |
| 221 | + "type": "string", |
| 222 | + "description": "Shell command executed in a new terminal (shellCommand)." |
| 223 | + }, |
| 224 | + "command": { |
| 225 | + "type": "string", |
| 226 | + "description": "VS Code command ID (vscodeCommand)." |
| 227 | + }, |
| 228 | + "args": { |
| 229 | + "type": "array", |
| 230 | + "description": "Optional VS Code command arguments.", |
| 231 | + "items": { |
| 232 | + "type": "string" |
| 233 | + } |
| 234 | + } |
191 | 235 | }, |
192 | | - "required": ["type"] |
| 236 | + "required": [ |
| 237 | + "type" |
| 238 | + ] |
193 | 239 | } |
194 | 240 | }, |
195 | 241 | "required": [ |
|
207 | 253 | "configurationName": "Run test.js", |
208 | 254 | "breakpointConfig": { |
209 | 255 | "breakpoints": [ |
210 | | - { "path": "src/server.ts", "line": 27, "action": "capture", "logMessage": "port={PORT}", "variableFilter": ["PORT"] } |
| 256 | + { |
| 257 | + "path": "src/server.ts", |
| 258 | + "line": 27, |
| 259 | + "action": "capture", |
| 260 | + "logMessage": "port={PORT}", |
| 261 | + "variableFilter": [ |
| 262 | + "PORT" |
| 263 | + ] |
| 264 | + } |
211 | 265 | ] |
212 | 266 | }, |
213 | 267 | "serverReady": { |
214 | | - "trigger": { "pattern": "listening on .*:(\\d+)" }, |
215 | | - "action": { "type": "httpRequest", "url": "http://localhost:%PORT%/swagger" } |
| 268 | + "trigger": { |
| 269 | + "pattern": "listening on .*:(\\d+)" |
| 270 | + }, |
| 271 | + "action": { |
| 272 | + "type": "httpRequest", |
| 273 | + "url": "http://localhost:%PORT%/swagger" |
| 274 | + } |
216 | 275 | } |
217 | 276 | }, |
218 | 277 | { |
219 | 278 | "workspaceFolder": "/abs/path/project", |
220 | | - "breakpointConfig": { "breakpoints": [ { "path": "src/index.ts", "line": 10 } ] }, |
221 | | - "serverReady": { "action": { "type": "shellCommand", "shellCommand": "curl http://localhost:3000/health" } } |
| 279 | + "breakpointConfig": { |
| 280 | + "breakpoints": [ |
| 281 | + { |
| 282 | + "path": "src/index.ts", |
| 283 | + "line": 10 |
| 284 | + } |
| 285 | + ] |
| 286 | + }, |
| 287 | + "serverReady": { |
| 288 | + "action": { |
| 289 | + "type": "shellCommand", |
| 290 | + "shellCommand": "curl http://localhost:3000/health" |
| 291 | + } |
| 292 | + } |
222 | 293 | } |
223 | 294 | ] |
224 | 295 | } |
|
0 commit comments