Skip to content

Commit 0a0a4c3

Browse files
Re-Add stopping on main after restart
1 parent 077af79 commit 0a0a4c3

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

.vscode/launch.json

+23-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
// Connect to an already running OpenOCD instance
1313
"gdbTarget": "host.docker.internal:3333",
1414
"svdFile": "${workspaceRoot}/nrf52.svd",
15-
"runToEntryPoint": "main"
15+
"runToEntryPoint": "main",
16+
// Work around for stopping at main on restart
17+
"postRestartCommands": [
18+
"break main",
19+
"continue"
20+
]
1621
},
1722
{
1823
"name": "Debug - Openocd Local",
@@ -25,7 +30,12 @@
2530
// Connect to an already running OpenOCD instance
2631
"gdbTarget": "localhost:3333",
2732
"svdFile": "${workspaceRoot}/nrf52.svd",
28-
"runToEntryPoint": "main"
33+
"runToEntryPoint": "main",
34+
// Work around for stopping at main on restart
35+
"postRestartCommands": [
36+
"break main",
37+
"continue"
38+
]
2939
},
3040
{
3141
"cwd": "${workspaceRoot}",
@@ -37,6 +47,11 @@
3747
"showDevDebugOutput": false,
3848
"servertype": "openocd",
3949
"runToMain": true,
50+
// Work around for stopping at main on restart
51+
"postRestartCommands": [
52+
"break main",
53+
"continue"
54+
],
4055
// Only use armToolchainPath if your arm-none-eabi-gdb is not in your path (some GCC packages does not contain arm-none-eabi-gdb)
4156
"armToolchainPath": "${workspaceRoot}/../gcc-arm-none-eabi-10.3-2021.10/bin",
4257
"svdFile": "${workspaceRoot}/nrf52.svd",
@@ -57,7 +72,12 @@
5772
// Connect to an already running OpenOCD instance
5873
"gdbTarget": "host.docker.internal:3333",
5974
"svdFile": "${workspaceRoot}/nrf52.svd",
60-
"runToEntryPoint": "main"
75+
"runToEntryPoint": "main",
76+
// Work around for stopping at main on restart
77+
"postRestartCommands": [
78+
"break main",
79+
"continue"
80+
]
6181
},
6282
]
6383
}

0 commit comments

Comments
 (0)