Skip to content

Commit f47f95e

Browse files
authored
Show CHIP app selector when staring Linux/Darwin debugger (project-chip#23274)
* Show CHIP app selector when staring Linux debugger * Add run application for Darwin hosts
1 parent 3c11013 commit f47f95e

File tree

3 files changed

+36
-24
lines changed

3 files changed

+36
-24
lines changed

.devcontainer/devcontainer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@
3131
"esbenp.prettier-vscode",
3232
"foxundermoon.shell-format",
3333
"github.vscode-pull-request-github",
34-
"knisterpeter.vscode-github",
3534
"maelvalais.autoconf",
3635
"marus25.cortex-debug",
3736
"ms-azuretools.vscode-docker",
3837
"msedge-dev.gnls",
39-
"npclaudiu.vscode-gn",
4038
"redhat.vscode-yaml",
39+
"vadimcn.vscode-lldb",
4140
"xaver.clang-format",
4241
"yuichinukiyama.vscode-preview-server",
4342
"yzhang.markdown-all-in-one"

.vscode/extensions.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
"esbenp.prettier-vscode",
1313
"foxundermoon.shell-format",
1414
"github.vscode-pull-request-github",
15-
"knisterpeter.vscode-github",
1615
"maelvalais.autoconf",
1716
"marus25.cortex-debug",
1817
"ms-azuretools.vscode-docker",
1918
"msedge-dev.gnls",
20-
"npclaudiu.vscode-gn",
2119
"redhat.vscode-yaml",
20+
"vadimcn.vscode-lldb",
2221
"xaver.clang-format",
2322
"yuichinukiyama.vscode-preview-server",
2423
"yzhang.markdown-all-in-one"

.vscode/launch.json

+34-20
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@
1010
"request": "attach",
1111
"pid": "${command:pickProcess}"
1212
},
13+
{
14+
"name": "Run application (Darwin x64)",
15+
"type": "lldb",
16+
"request": "launch",
17+
"program": "${workspaceFolder}/out/${input:outAppDarwin}",
18+
"args": [],
19+
"cwd": "${workspaceFolder}"
20+
},
21+
{
22+
"name": "Run application (Linux x64)",
23+
"type": "lldb",
24+
"request": "launch",
25+
"program": "${workspaceFolder}/out/${input:outAppLinux}",
26+
"args": [],
27+
"cwd": "${workspaceFolder}"
28+
},
1329
{
1430
"name": "QRCode Tests",
1531
"type": "cppdbg",
@@ -70,26 +86,6 @@
7086
}
7187
]
7288
},
73-
{
74-
"name": "LightingApp (Linux)",
75-
"type": "cppdbg",
76-
"request": "launch",
77-
"program": "${workspaceFolder}/out/lighting-app/chip-lighting-app",
78-
"args": [],
79-
"stopAtEntry": false,
80-
"cwd": "${workspaceFolder}",
81-
"environment": [],
82-
"externalConsole": false,
83-
"MIMode": "gdb",
84-
"preLaunchTask": "Build Lighting App (Linux)",
85-
"setupCommands": [
86-
{
87-
"description": "Enable pretty-printing for gdb",
88-
"text": "-enable-pretty-printing",
89-
"ignoreFailures": true
90-
}
91-
]
92-
},
9389
{
9490
"name": "LightingApp (Tizen) [remote]",
9591
"type": "cppdbg",
@@ -423,6 +419,24 @@
423419
}
424420
],
425421
"inputs": [
422+
{
423+
"type": "command",
424+
"id": "outAppDarwin",
425+
"command": "shellCommand.execute",
426+
"args": {
427+
"command": "find ${workspaceFolder}/out/darwin-x64-* -maxdepth 2 -perm +111 -name 'chip-*' |sort |sed 's$${workspaceFolder}/out/$$'",
428+
"description": "Select the application to run"
429+
}
430+
},
431+
{
432+
"type": "command",
433+
"id": "outAppLinux",
434+
"command": "shellCommand.execute",
435+
"args": {
436+
"command": "find ${workspaceFolder}/out/linux-x64-* -maxdepth 2 -executable -name 'chip-*' |sort |sed 's$${workspaceFolder}/out/$$'",
437+
"description": "Select the application to run"
438+
}
439+
},
426440
{
427441
"type": "pickString",
428442
"id": "mbedDebugProfile",

0 commit comments

Comments
 (0)