iarsystems / iar-vsc-debug

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

Can it intelligently determine whether to recompile the source code before debugging? #29

Closed TwoBrushes closed 1 year ago

TwoBrushes commented 1 year ago

Is it possible to achieve the same functionality as IAR Workbench, where when clicking "download and debug" or "restart debug", if there are any changes in the source code, it will first perform a rebuild operation?

jlonnberg commented 1 year ago

It can be done by adding

"preLaunchTask": "iar: Rebuild Project"

to your launch.json.

TwoBrushes commented 1 year ago

It can be done by adding

"preLaunchTask": "iar: Rebuild Project"

to your launch.json.

If these settings are applied, even if the source code is not modified, it will still be compiled before debugging. Is it possible to set it so that if the source code is not modified, it will not be compiled?

jlonnberg commented 1 year ago

@TwoBrushes Swap it for "iar: Build Project" which will perform an incremental build instead, i.e., only build if the project is not up to date