Skip to content

Commit 9e61ff5

Browse files
committed
Should resolve "Failed to validate tool start_debugger_with_breakpoints: Error: tool parameters array type must have items. "
1 parent f3a4df0 commit 9e61ff5

File tree

1 file changed

+94
-23
lines changed

1 file changed

+94
-23
lines changed

package.json

Lines changed: 94 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,15 @@
7070
"copilot-debugger.serverReadyEnabled": {
7171
"type": "boolean",
7272
"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."
7474
},
7575
"copilot-debugger.serverReadyDefaultActionType": {
7676
"type": "string",
77-
"enum": ["httpRequest", "shellCommand", "vscodeCommand"],
77+
"enum": [
78+
"httpRequest",
79+
"shellCommand",
80+
"vscodeCommand"
81+
],
7882
"default": "httpRequest",
7983
"description": "Preferred serverReady action type surfaced in samples and quick insert command."
8084
}
@@ -144,10 +148,10 @@
144148
"logMessage": {
145149
"type": "string",
146150
"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)."
151155
}
152156
},
153157
"required": [
@@ -167,9 +171,18 @@
167171
"type": "object",
168172
"description": "Readiness trigger. Provide either path+line for breakpoint or pattern for output-based readiness. Omit entirely for immediate attach execution.",
169173
"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+
}
173186
}
174187
},
175188
"action": {
@@ -178,18 +191,51 @@
178191
"properties": {
179192
"type": {
180193
"type": "string",
181-
"enum": ["httpRequest", "shellCommand", "vscodeCommand"],
194+
"enum": [
195+
"httpRequest",
196+
"shellCommand",
197+
"vscodeCommand"
198+
],
182199
"description": "Action type discriminator."
183200
},
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+
}
191235
},
192-
"required": ["type"]
236+
"required": [
237+
"type"
238+
]
193239
}
194240
},
195241
"required": [
@@ -207,18 +253,43 @@
207253
"configurationName": "Run test.js",
208254
"breakpointConfig": {
209255
"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+
}
211265
]
212266
},
213267
"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+
}
216275
}
217276
},
218277
{
219278
"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+
}
222293
}
223294
]
224295
}

0 commit comments

Comments
 (0)