iarsystems / iar-vsc-debug

Visual Studio Code extension for the IAR C-SPY Debugger
https://marketplace.visualstudio.com/items?itemName=iarsystems.iar-debug
19 stars 1 forks source link

Attach to running target (I-jet/J-Link) #15

Closed david-iar closed 1 year ago

david-iar commented 2 years ago

Attach to a running target using the "request" type "attach" in the launch.json seems to not work. Tested by @felipe-iar with both IAR I-jet and Segger J-Link + customer using J-Link.

Please advice if this is supposed to work. If not, please see this is as a feature request.

HampusAdolfsson commented 1 year ago

The "request" field in the launch.json file is a built-in field that all VS Code debuggers have, even if they do not support it (we currently don't).

It is fairly straightforward to implement, so it is definitely something we can include in a future release. In the meantime I will add an error message when using the "attach" request.

gcampbell-msft commented 1 year ago

Commenting to indicate another request for this. Thanks!

HampusAdolfsson commented 1 year ago

This was just released in 1.30.1. Setting "leaveTargetRunning": true in launch.json prevents the debugger from stopping the target at the end of the session, and you can then attach to it with "request": "attach".

Note that leaveTargetRunning is only guaranteed to work with EWARM 9.40 at the moment; YMMV with other versions.