iarsystems / iar-vsc-debug

Visual Studio Code extension for the IAR C-SPY debugger
19 stars 1 forks source link

--backend in debugger's extra options causes an error #14

Closed pawelszramowski closed 1 year ago

pawelszramowski commented 1 year ago

We have the following arguments in Project Options/Debugger/Extra Options to pass the target to the J-Link driver:

--backend --target=\<NAME>

This prevents a dialog asking for core/device selection from showing up. However, they cause the extension to show the following error:

CSpyException: failed to configure debugger driver ()

Debug Console shows the following message:

Using C-SPY version: 8.3.4.6127 Driver loaded: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\bin\armjlink2.dll Fatal error: Option:--backend defined more than once Session aborted!

The arguments need to be removed from the automatically generated .vscode/launch.json file as a workaround.

pawelszramowski commented 1 year ago

Windows 10 IAR Embedded Workbench for ARM 8.40.2 IAR C-SPY Debug v1.10.5

HampusAdolfsson commented 1 year ago

As far as I am aware, arguments entered under Project Options/Debugger/Extra Options are sent directly to the backend, so the --backend is redundant here.

Embedded Workbench will simply ignore the --backend argument, but the VS Code extension does not. We'll consider this a bug, since the VS Code extension should behave the same as Embedded Workbench.