Skip to content

Commit 93de457

Browse files
add snippets for debug configurations
1 parent 6790937 commit 93de457

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

package.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,9 @@
12521252
{
12531253
"type": "swift",
12541254
"label": "Swift Debugger",
1255+
"variables": {
1256+
"PickProcess": "lldb-dap.pickProcess"
1257+
},
12551258
"configurationAttributes": {
12561259
"launch": {
12571260
"required": [
@@ -1384,6 +1387,7 @@
13841387
},
13851388
"pid": {
13861389
"type": [
1390+
"string",
13871391
"number"
13881392
],
13891393
"description": "System process ID to attach to."
@@ -1454,7 +1458,42 @@
14541458
}
14551459
}
14561460
}
1457-
}
1461+
},
1462+
"configurationSnippets": [
1463+
{
1464+
"label": "Swift: Launch",
1465+
"description": "",
1466+
"body": {
1467+
"type": "swift",
1468+
"request": "launch",
1469+
"name": "${2:Launch Swift Executable}",
1470+
"program": "^\"\\${workspaceRoot}/.build/debug/${1:<program>}\"",
1471+
"args": [],
1472+
"env": {},
1473+
"cwd": "^\"\\${workspaceRoot}\""
1474+
}
1475+
},
1476+
{
1477+
"label": "Swift: Attach to Process",
1478+
"description": "",
1479+
"body": {
1480+
"type": "swift",
1481+
"request": "attach",
1482+
"name": "${2:Attach to Swift Executable}",
1483+
"pid": "^\"\\${command:PickProcess}\""
1484+
}
1485+
},
1486+
{
1487+
"label": "Swift: Attach",
1488+
"description": "",
1489+
"body": {
1490+
"type": "swift",
1491+
"request": "attach",
1492+
"name": "${2:Attach to Swift Executable}",
1493+
"program": "^\"\\${workspaceRoot}/.build/debug/${1:<program>}\""
1494+
}
1495+
}
1496+
]
14581497
}
14591498
]
14601499
},

0 commit comments

Comments
 (0)