Hello Johan,
First i recommend you create one simple project to have a try .
If still the same error ,
In order to help you solve the problem , please show these screenshot to me when you test on CW10.6 :
- The debugger configure view

please confirm you use SWD or JTAG interface , if use SWD , please select the option .
- The error screenshot .
- The console view after debug or show error :

BR
Alice