Skip to content
This repository was archived by the owner on Jan 15, 2022. It is now read-only.

Commit 090b4b0

Browse files
committed
eclipse-cdt-cloud#30: Add debug configuration info for target debugging
1 parent 97e1732 commit 090b4b0

File tree

1 file changed

+196
-1
lines changed

1 file changed

+196
-1
lines changed

package.json

+196-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,202 @@
124124
{
125125
"type": "gdb",
126126
"request": "launch",
127-
"name": "gdb launch"
127+
"name": "gdb launch",
128+
"program": "${workspaceFolder}/${command:askProgramPath}"
129+
}
130+
],
131+
"configurationSnippets": [
132+
{
133+
"label": "GDB CDT Local debugging",
134+
"description": "A new configuration for local debugging using GDB.",
135+
"body": {
136+
"type": "gdb",
137+
"request": "launch",
138+
"name": "Name here",
139+
"program": "^\"\\${workspaceFolder}/\\${command:askProgramPath}\""
140+
}
141+
}
142+
]
143+
},
144+
{
145+
"type": "gdbtarget",
146+
"label": "GDB Target",
147+
"program": "./node_modules/cdt-gdb-adapter/dist/debugTargetAdapter.js",
148+
"runtime": "node",
149+
"configurationAttributes": {
150+
"launch": {
151+
"required": [
152+
"program"
153+
],
154+
"properties": {
155+
"gdb": {
156+
"type": "string",
157+
"description": "Path to gdb",
158+
"default": "gdb"
159+
},
160+
"program": {
161+
"type": "string",
162+
"description": "Path to the program to be launched",
163+
"default": "${workspaceFolder}/${command:askProgramPath}"
164+
},
165+
"verbose": {
166+
"type": "boolean",
167+
"description": "Produce verbose log output",
168+
"default": "false"
169+
},
170+
"logFile": {
171+
"type": "string",
172+
"description": "Absolute path to the file to log interaction with gdb"
173+
},
174+
"openGdbConsole": {
175+
"type": "boolean",
176+
"description": "(UNIX-only) Open a GDB console in your IDE while debugging"
177+
},
178+
"target": {
179+
"type": "object",
180+
"default": {},
181+
"properties": {
182+
"type": {
183+
"type": "string",
184+
"description": "The kind of target debugging to do. This is passed to -target-select (defaults to remote)",
185+
"default": "remote"
186+
},
187+
"parameters": {
188+
"type": "array",
189+
"description": "Target parameters for the type of target. Normally something like localhost:12345. (defaults to `${host}:${port}`)",
190+
"items": {
191+
"type": "string"
192+
},
193+
"default": []
194+
},
195+
"host": {
196+
"type": "string",
197+
"description": "Target host to connect to (defaults to 'localhost', ignored if parameters is set)",
198+
"default": "localhost"
199+
},
200+
"port": {
201+
"type": "string",
202+
"description": "Target port to connect to (defaults to value captured by serverPortRegExp, ignored if parameters is set)",
203+
"default": "gdbserver"
204+
},
205+
"server": {
206+
"type": "string",
207+
"description": "The executable for the target server to launch (e.g. gdbserver or JLinkGDBServerCLExe) (defaults to gdbserver)",
208+
"default": "gdbserver"
209+
},
210+
"serverParameters": {
211+
"type": "array",
212+
"description": "Command line arguments passed to server (defaults to --once :0 ${args.program}).",
213+
"items": {
214+
"type": "string"
215+
},
216+
"default": []
217+
},
218+
"serverPortRegExp": {
219+
"type": "string",
220+
"description": "Regular expression to extract port from by examinging stdout/err of server. Once server is launched, port will be set to this if port is not set. Defaults to matching a string like 'Listening on port 41551' which is what gdbserver provides. Ignored if port or parameters is set",
221+
"default": ""
222+
},
223+
"serverStartupDelay": {
224+
"type": "number",
225+
"description": "Delay after startup before continuing launch, in milliseconds. If serverPortRegExp is provided, it is the delay after that regexp is seen.",
226+
"default": "0"
227+
}
228+
}
229+
}
230+
}
231+
},
232+
"attach": {
233+
"required": [
234+
"program"
235+
],
236+
"properties": {
237+
"gdb": {
238+
"type": "string",
239+
"description": "Path to gdb",
240+
"default": "gdb"
241+
},
242+
"program": {
243+
"type": "string",
244+
"description": "Path to the program to be debugged",
245+
"default": "${workspaceFolder}/${command:askProgramPath}"
246+
},
247+
"verbose": {
248+
"type": "boolean",
249+
"description": "Produce verbose log output",
250+
"default": "false"
251+
},
252+
"logFile": {
253+
"type": "string",
254+
"description": "Absolute path to the file to log interaction with gdb"
255+
},
256+
"openGdbConsole": {
257+
"type": "boolean",
258+
"description": "(UNIX-only) Open a GDB console in your IDE while debugging"
259+
},
260+
"target": {
261+
"type": "object",
262+
"default": {},
263+
"properties": {
264+
"type": {
265+
"type": "string",
266+
"description": "The kind of target debugging to do. This is passed to -target-select (defaults to remote)",
267+
"default": "remote"
268+
},
269+
"parameters": {
270+
"type": "array",
271+
"description": "Target parameters for the type of target. Normally something like localhost:12345. (defaults to `${host}:${port}`)",
272+
"items": {
273+
"type": "string"
274+
},
275+
"default": []
276+
},
277+
"host": {
278+
"type": "string",
279+
"description": "Target host to connect to (defaults to 'localhost', ignored if parameters is set)",
280+
"default": "localhost"
281+
},
282+
"port": {
283+
"type": "string",
284+
"description": "Target port to connect to (defaults to value captured by serverPortRegExp, ignored if parameters is set)",
285+
"default": "gdbserver"
286+
}
287+
}
288+
}
289+
}
290+
}
291+
},
292+
"variables": {
293+
"askProgramPath": "cdt.debug.askProgramPath"
294+
},
295+
"initialConfigurations": [
296+
{
297+
"type": "gdbtarget",
298+
"request": "attach",
299+
"name": "gdb remote attach",
300+
"program": "${workspaceFolder}/${command:askProgramPath}"
301+
}
302+
],
303+
"configurationSnippets": [
304+
{
305+
"label": "GDB CDT Remote debugging - automatic launching of gdbserver",
306+
"description": "A new configuration for remote debugging using GDB with launching of gdbserver.",
307+
"body": {
308+
"type": "gdbtarget",
309+
"request": "launch",
310+
"name": "Name here",
311+
"program": "^\"\\${workspaceFolder}/\\${command:askProgramPath}\""
312+
}
313+
},
314+
{
315+
"label": "GDB CDT Remote debugging",
316+
"description": "A new configuration for remote debugging using GDB.",
317+
"body": {
318+
"type": "gdbtarget",
319+
"request": "attach",
320+
"name": "Name here",
321+
"program": "^\"\\${workspaceFolder}/\\${command:askProgramPath}\""
322+
}
128323
}
129324
]
130325
}

0 commit comments

Comments
 (0)