CodeLLDB.json

  1{
  2  "allOf": [
  3    {
  4      "if": { "properties": { "request": { "const": "launch" } }, "required": ["request"] },
  5      "then": {
  6        "properties": {
  7          "program": { "description": "Path to the program to debug.", "type": "string" },
  8          "cargo": {
  9            "description": "Cargo invocation parameters.",
 10            "type": "object",
 11            "properties": {
 12              "args": { "description": "Cargo command line arguments.", "type": "array", "default": [] },
 13              "env": {
 14                "description": "Additional environment variables passed to Cargo.",
 15                "type": "object",
 16                "patternProperties": { ".*": { "type": "string" } },
 17                "default": {}
 18              },
 19              "cwd": { "description": "Cargo working directory.", "type": "string" },
 20              "problemMatcher": {
 21                "description": "Problem matcher(s) to apply to Cargo output.",
 22                "type": ["string", "array"]
 23              },
 24              "filter": {
 25                "description": "Filter applied to compilation artifacts.",
 26                "type": "object",
 27                "properties": { "name": { "type": "string" }, "kind": { "type": "string" } }
 28              }
 29            },
 30            "required": ["args"],
 31            "additionalProperties": false,
 32            "defaultSnippets": [
 33              {
 34                "label": "Library unit tests",
 35                "body": { "args": ["test", "--no-run", "--lib"], "filter": { "kind": "lib" } }
 36              },
 37              { "label": "Executable", "body": { "args": ["build", "--bin=${1:<name>}"], "filter": { "kind": "bin" } } }
 38            ]
 39          },
 40          "args": { "description": "Program arguments.", "type": ["array", "string"] },
 41          "cwd": { "description": "Program working directory.", "type": "string" },
 42          "env": {
 43            "description": "Additional environment variables.",
 44            "type": "object",
 45            "patternProperties": { ".*": { "type": "string" } }
 46          },
 47          "envFile": { "description": "File to read the environment variables from.", "type": "string" },
 48          "stdio": {
 49            "description": "Destination for stdio streams: null = send to debugger console or a terminal, \"<path>\" = attach to a file/tty/fifo.",
 50            "type": ["null", "string", "array", "object"],
 51            "default": null
 52          },
 53          "terminal": {
 54            "description": "Terminal type to use.",
 55            "type": "string",
 56            "enum": ["integrated", "external", "console"],
 57            "enumDescriptions": [
 58              "Use integrated terminal in VSCode.",
 59              "Use external terminal window.",
 60              "Use VScode Debug Console for stdout and stderr. Stdin will be unavailable."
 61            ],
 62            "default": "integrated"
 63          },
 64          "console": {
 65            "description": "Terminal type to use. (This setting is a compatibility alias of 'terminal'.)",
 66            "type": "string",
 67            "enum": ["integratedTerminal", "externalTerminal", "internalConsole"],
 68            "enumDescriptions": [
 69              "Use integrated terminal in VSCode.",
 70              "Use external terminal window.",
 71              "Use VScode Debug Console for stdout and stderr. Stdin will be unavailable."
 72            ]
 73          },
 74          "stopOnEntry": {
 75            "description": "Automatically stop debuggee after launch.",
 76            "type": "boolean",
 77            "default": false
 78          },
 79          "initCommands": {
 80            "description": "Initialization commands executed upon debugger startup.",
 81            "type": "array",
 82            "items": { "type": "string" },
 83            "default": []
 84          },
 85          "targetCreateCommands": {
 86            "description": "Commands that create the debug target.",
 87            "type": "array",
 88            "items": { "type": "string" },
 89            "default": []
 90          },
 91          "preRunCommands": {
 92            "description": "Commands executed just before the program is launched.",
 93            "type": "array",
 94            "items": { "type": "string" },
 95            "default": []
 96          },
 97          "processCreateCommands": {
 98            "description": "Commands that create the debuggee process.",
 99            "type": "array",
100            "items": { "type": "string" },
101            "default": []
102          },
103          "postRunCommands": {
104            "description": "Commands executed just after the program has been launched.",
105            "type": "array",
106            "items": { "type": "string" },
107            "default": []
108          },
109          "preTerminateCommands": {
110            "description": "Commands executed just before the debuggee is terminated or disconnected from.",
111            "type": "array",
112            "items": { "type": "string" },
113            "default": []
114          },
115          "exitCommands": {
116            "description": "Commands executed at the end of debugging session.",
117            "type": "array",
118            "items": { "type": "string" },
119            "default": []
120          },
121          "expressions": {
122            "description": "The default evaluator type used for expressions.",
123            "type": "string",
124            "enum": ["simple", "python", "native"]
125          },
126          "sourceMap": {
127            "description": "Source path remapping between the build machine and the local machine.  Each item is a pair of remote and local path prefixes.",
128            "type": "object",
129            "patternProperties": { ".*": { "type": ["string", "null"] } },
130            "default": {}
131          },
132          "relativePathBase": {
133            "description": "Base directory used for resolution of relative source paths.  Defaults to \"${ZED_WORKTREE_ROOT}\".",
134            "type": "string"
135          },
136          "sourceLanguages": {
137            "description": "A list of source languages to enable language-specific features for.",
138            "type": "array",
139            "default": []
140          },
141          "reverseDebugging": {
142            "description": "Enable reverse debugging (Requires reverse execution support in the debug server, see User's Manual for details).",
143            "type": "boolean",
144            "default": false
145          },
146          "breakpointMode": {
147            "description": "Specifies how source breakpoints should be set.",
148            "type": "string",
149            "enum": ["path", "file"],
150            "enumDescriptions": [
151              "Resolve locations using full source file path.",
152              "Resolve locations using file name only."
153            ]
154          }
155        },
156        "anyOf": [{ "required": ["program"] }, { "required": ["targetCreateCommands"] }, { "required": ["cargo"] }]
157      }
158    },
159    {
160      "if": { "properties": { "request": { "const": "attach" } }, "required": ["request"] },
161      "then": {
162        "properties": {
163          "program": { "description": "Path to the program to attach to.", "type": "string" },
164          "pid": {
165            "description": "Process id to attach to.",
166            "type": ["integer", "string"],
167            "default": "${command:pickMyProcess}"
168          },
169          "stopOnEntry": {
170            "description": "Automatically stop debuggee after attach.",
171            "type": "boolean",
172            "default": false
173          },
174          "waitFor": {
175            "description": "Wait for the process to launch (MacOS only).",
176            "type": "boolean",
177            "default": false
178          },
179          "initCommands": {
180            "description": "Initialization commands executed upon debugger startup.",
181            "type": "array",
182            "items": { "type": "string" },
183            "default": []
184          },
185          "targetCreateCommands": {
186            "description": "Commands that create the debug target.",
187            "type": "array",
188            "items": { "type": "string" },
189            "default": []
190          },
191          "preRunCommands": {
192            "description": "Commands executed just before the program is launched.",
193            "type": "array",
194            "items": { "type": "string" },
195            "default": []
196          },
197          "processCreateCommands": {
198            "description": "Commands that create the debuggee process.",
199            "type": "array",
200            "items": { "type": "string" },
201            "default": []
202          },
203          "postRunCommands": {
204            "description": "Commands executed just after the program has been launched.",
205            "type": "array",
206            "items": { "type": "string" },
207            "default": []
208          },
209          "exitCommands": {
210            "description": "Commands executed at the end of debugging session.",
211            "type": "array",
212            "items": { "type": "string" },
213            "default": []
214          },
215          "expressions": {
216            "description": "The default evaluator type used for expressions.",
217            "type": "string",
218            "enum": ["simple", "python", "native"]
219          },
220          "sourceMap": {
221            "description": "Source path remapping between the build machine and the local machine.  Each item is a pair of remote and local path prefixes.",
222            "type": "object",
223            "patternProperties": { ".*": { "type": ["string", "null"] } },
224            "default": {}
225          },
226          "relativePathBase": {
227            "description": "Base directory used for resolution of relative source paths.  Defaults to \"${ZED_WORKTREE_ROOT}\".",
228            "type": "string"
229          },
230          "sourceLanguages": {
231            "description": "A list of source languages to enable language-specific features for.",
232            "type": "array",
233            "default": []
234          },
235          "reverseDebugging": {
236            "description": "Enable reverse debugging (Requires reverse execution support in the debug server, see User's Manual for details).",
237            "type": "boolean",
238            "default": false
239          },
240          "breakpointMode": {
241            "description": "Specifies how source breakpoints should be set.",
242            "type": "string",
243            "enum": ["path", "file"],
244            "enumDescriptions": [
245              "Resolve locations using full source file path.",
246              "Resolve locations using file name only."
247            ]
248          }
249        }
250      }
251    }
252  ]
253}