IARSystems / iar-vsc-debug

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

Debug session is not aborted after debugger error #35

Open pawelszramowski opened 2 weeks ago

pawelszramowski commented 2 weeks ago

Describe the bug:

I have a flaky J-Link that frequently causes an error like this: image

When I agree to abort the debug session by clicking Yes in the message box, the debug session is not actually aborted. I need to Stop (Shift+F5) it manually.

To Reproduce:

Have the debugger report an error... Disconnecting the debugger from the computer may have the same effect but I haven't checked.

Expected behavior:

The debug session is aborted after clicking Yes.

Actual behavior:

The debug session is not aborted after clicking Yes.

Environment:

Additional context:

Output from IAR C-SPY Debug:

[6/14/2024, 2:47:29 PM][Debug] Failed to generate config from build extension: Error: Could not get C-SPY cmdline
[6/14/2024, 2:47:35 PM][Debug] Session Tracker: Started 'Project.Debug'
[6/14/2024, 2:51:17 PM][Debug] Session Tracker: Terminated 'Project.Debug'

The first line shows after I Start debugging (F5). The second line shows after I select the debugger. The last line shows after I manually Stop (Shift + F5) the debug session.

HampusAdolfsson commented 2 weeks ago

Hi!

I've fixed a bug that caused the debug session not to abort when encountering a fatal error. I haven't been able to reproduce your specific error, but disconnecting the board mid-session produces a similar dialog which is now able to properly abort the session. I am fairly confident this will work for the dialog you're describing too. The fix will be included in the next release.