I also have some debug problems with nrf52-dk and mbed, see here
I haven’t really tried it wit CMSIS-DAP, but jlink works.
This is my current platformio.ini file
[env:nrf52_dk]
platform = nordicnrf52
framework = mbed
board = nrf52_dk
debug_tool = jlink
build_unflags = -Os
build_flags = -O1 -g3 -ggdb
With the last two lines
build_unflags = -Os
build_flags = -O1 -g3 -ggdb
I tried to solve my problem, but without success (not showing variables while debugging).