How to run app in VS simulator in "release" mode

I'm looking for some guidance on running my app in VS.

I have implemented the :debug annotation with great results, but now want to run my app in the simulator in :release mode.

I'm sure it's possible probably by editing launch.json , but I haven't  found the right incantation.

  • I can see the task, but haven't found out how to implement it.

    Here's the build command being executed from  Run App: 

    > Executing task: 
    java -Xms1g 
    -Dfile.encoding=UTF-8 
    -Dapple.awt.UIElement=true 
    -jar /Users/{my user name}/Library/Application Support/Garmin/ConnectIQ/Sdks/connectiq-sdk-mac-4.1.3-2022-05-10-b3aaee541/bin/monkeybrains.jar 
    -o bin/raceQs.prg 
    -f /Users/{my user name}/Documents/watchApp/raceQs/monkey.jungle 
    -y /Users/{my user name}/{my developer key location}
    -d epix2_sim 
    -w 
    <

    I need to add -r to the java arguments, like:

    > Executing task: 
    java -Xms1g 
    -Dfile.encoding=UTF-8 
    -Dapple.awt.UIElement=true 
    -jar /Users/{my user name}/Library/Application Support/Garmin/ConnectIQ/Sdks/connectiq-sdk-mac-4.1.3-2022-05-10-b3aaee541/bin/monkeybrains.jar 
    -o bin/raceQs.prg 
    -f /Users/{my user name}/Documents/watchApp/raceQs/monkey.jungle 
    -y /Users/{my user name}/{my developer key location}
    -d epix2_sim 
    -w 
    -r
    <

    But I can't see how to implement it in VS Code.

    Anyone?

  • Found it: 

    VSCode > Extensions > Monkey C> Extensions Settings > Compiler Options > -r

    I'll have to remember to remove it to include :debug annotated code.

  • You can Build For Device > choose device > choose Release. IMHO the next time you Run it'll use this build. But there might be some bug in the VSC plugin, because it's inconsistent (for example sometimes it gets stuck on a certain device and it doesn't allow me to choose device on Run, but sometimes it works)