If you follow the steps below, this should get the debugging running for your project, before it is added to the software:
1) Right Click project in Solution Explorer > Add > Add Custom GDB Debugger (Advanced)
2) Replace the contents of the file with the code below, and save it
3) Select vMicro > Debugger > Debug: Hardware
4) Select vMicro > Debugger > Hardware Debugger: Manual/Custom
5) Build and Upload the project
6) Try Debug > Attach to Process
Custom Launch JSON (STLinkv2 + NRF51x): {
// MI Debugger Properties for NRF52x ++ STLink V2 (Ext)
"serverLaunchTimeout": 5000,
"filterStdout": false,
"filterStderr": true,
"targetArchitecture": "arm",
"stopAtEntry": false,
"externalConsole": false,
"MIMode": "gdb",
"MIDebuggerServerAddress": "localhost:3333",
"cwd": "$(buildPath)",
"MIDebuggerPath": -arm-none-eabi\\5_2-2015q4\\bin\\arm-none-eabi-gdb.exe",
"MIDebuggerArgs": "",
"debugServerPath": "C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213\\bin/openocd.exe",
"debugServerArgs": "-d2 -s \"C:\\ProgramData\\vmicro\\tools\\openocd-0.10.0.20200213/scripts/\" -f \"interface/stlink.cfg\" -c \"transport select hla_swd\" -f \"target/nrf51.cfg\" -c \"init\"",
"program": "$(program)",
"logging": {
"moduleLoad": false,
"trace": false,
"engineLogging": false,
"programOutput": false,
"exceptions": false,
"traceResponse": false
},
"showDisplayString": true
}
If there are any issues, please attach the output from the Output > Debug Window