Skip to content

Commit 27d9146

Browse files
add snippets for debug configurations
1 parent fabf4b3 commit 27d9146

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
@@ -1358,6 +1358,9 @@
13581358
{
13591359
"type": "swift",
13601360
"label": "Swift Debugger",
1361+
"variables": {
1362+
"PickProcess": "lldb-dap.pickProcess"
1363+
},
13611364
"configurationAttributes": {
13621365
"launch": {
13631366
"required": [
@@ -1490,6 +1493,7 @@
14901493
},
14911494
"pid": {
14921495
"type": [
1496+
"string",
14931497
"number"
14941498
],
14951499
"description": "System process ID to attach to."
@@ -1560,7 +1564,42 @@
15601564
}
15611565
}
15621566
}
1563-
}
1567+
},
1568+
"configurationSnippets": [
1569+
{
1570+
"label": "Swift: Launch",
1571+
"description": "",
1572+
"body": {
1573+
"type": "swift",
1574+
"request": "launch",
1575+
"name": "${2:Launch Swift Executable}",
1576+
"program": "^\"\\${workspaceRoot}/.build/debug/${1:<program>}\"",
1577+
"args": [],
1578+
"env": {},
1579+
"cwd": "^\"\\${workspaceRoot}\""
1580+
}
1581+
},
1582+
{
1583+
"label": "Swift: Attach to Process",
1584+
"description": "",
1585+
"body": {
1586+
"type": "swift",
1587+
"request": "attach",
1588+
"name": "${2:Attach to Swift Executable}",
1589+
"pid": "^\"\\${command:PickProcess}\""
1590+
}
1591+
},
1592+
{
1593+
"label": "Swift: Attach",
1594+
"description": "",
1595+
"body": {
1596+
"type": "swift",
1597+
"request": "attach",
1598+
"name": "${2:Attach to Swift Executable}",
1599+
"program": "^\"\\${workspaceRoot}/.build/debug/${1:<program>}\""
1600+
}
1601+
}
1602+
]
15641603
}
15651604
]
15661605
},

0 commit comments

Comments
 (0)