The following example shows a configuration that lets you skip specific functions and files during debugging to focus on the code you want to debug.
When you specify skipFunctions and skipFiles, the extension automatically creates or modifies a .gdbinit file in the build directory with the appropriate GDB commands. If a .gdbinit file already exists, the extension asks you to choose whether to keep it as-is, override it with the new entries, or append the new changes.
launch.json with skipFunctions and skipFiles configuration
{
"version": "0.2.0",
"configurations": [
{
"type": "nrf-connect",
"request": "launch",
"name": "Launch with skipped functions and files",
"config": "${activeConfig}",
"runToEntryPoint": "main",
"skipFunctions": [
"k_sleep",
"k_thread_yield",
"printk"
],
"skipFiles": [
"kernel.c",
"thread.c",
"printk.c"
]
}
]
}