Beta test build with debug option.

I want to test a new feature in my watchApp on a real device (a Fenix5) using the Beta Test release option. 

There used to be a build option in the project export process that offered the option to run in debug mode, but it's not there any more and the build command is defaulting with the -r compiler option.

Is there any way to suppress the -r option in a beta release?

[EDIT]

I can see a debug option in the "build for device" - but that is for a side load and in a side load, I don't get to test Settings changes, which is part of my test plan.

I have tried to suppress the -r option by editing  the  tasks.json, but it ignored my 

"compilerOptions": [ "-w", "-y", {mydeveloperkey}" ],
  • Good question. I think you need to look in launch.json, not in tasks.json

  • This one I found in {projectDir}.vscode/launch.json

    {
        // Use IntelliSense to learn about possible attributes.
        // Hover to view descriptions of existing attributes.
        // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [
    
            {
                "type": "monkeyc",
                "request": "launch",
                "name": "Run App",
                "prg": "${workspaceFolder}${pathSeparator}bin${pathSeparator}${workspaceFolderBasename}.prg",
                "prgDebugXml": "${workspaceFolder}${pathSeparator}bin${pathSeparator}${workspaceFolderBasename}.prg.debug.xml",
                "stopAtLaunch": false,
                "device": "${command:GetTargetDevice}"
            },
            {
                "type": "monkeyc",
                "request": "launch",
                "name": "Run Tests",
                "prg": "${workspaceFolder}${pathSeparator}bin${pathSeparator}test_${command:GetTargetDevice}_${workspaceFolderBasename}.prg",
                "prgDebugXml": "${workspaceFolder}${pathSeparator}bin${pathSeparator}test_${command:GetTargetDevice}_${workspaceFolderBasename}.prg.debug.xml",
                "runTests": true,
                "device": "${command:GetTargetDevice}"
            }
        ]
    }
    

    It doesn't look inviting!

  • 1) Run the export command from VS Code

    2) Copy the export command line from the build terminal

    3) Paste command line into editor window, add quotes where necessary, edit compiler options as necessary

    4) Open new terminal in VS Code

    5) Copy edited command line and paste it into the new terminal

    Once you have this working to your satisfaction, you can turn it into a shell script so it's easier to export the project on demand.

  • Thanks for the encouragement.

    I did try that yesterday but it didn't seem to run and I got tangled up in the long command. Tried again today and ran with parameters:

     -e  -l 0

    Where I simply dropped the -r from the original list 

    -e -r -l 0

    and it compiled OK, built the .iq and I successfully deployed it from the app store to my test Fenix 5, but when I ran the app it ran in the release mode, not in debug modeCry.

    Here's the command line:

    java -Xms1g -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar /Users/alansmith/Library/Application\ Support/Garmin/ConnectIQ/Sdks/connectiq-sdk-mac-7.3.0-2024-08-27-36488f6f5/bin/monkeybrains.jar -o /Users/alansmith/Downloads/raceQs.iq -f /Users/alansmith/Documents/watchApp/raceQs/monkey.jungle -y /Users/alansmith/developer_key.W10 -e  -l 0
    Any suggestions would be greatly appreciated.

  • Are you 100% that you really downloaded the version you just built and not the previous one? There's a known issue related to this. Do you display the build version in your app? Or do you have dome visible change since the previously uploaded version?

  • Thanks for the encouragement.

    Is this meant to be passive aggressive or sarcastic?

    I answered your question completely straightforwardly. I don't know of any supported way to change the compiler options for Monkey C: Export Project within the VS Code extension (short of editing the extension source itself), so I literally gave you the procedure I would use if i were to do it.

    If you're suggesting that it was an obvious answer (especially as you already tried it), well:

    - you could've mentioned that you tried it and it didn't work for you, but it seems like you waited for someone to suggest it so you could shoot it down after the fact

    - I'm actually trying to help here

    - Do you have a better solution?

    If you're suggesting that it's an inconvenient solution even if it worked, well, see above.

    it compiled OK, built the .iq and I successfully deployed it from the app store to my test Fenix 5, but when I ran the app it ran in the release mode, not in debug mode

    [flocsy beat me to it]

    Are you sure you're truly running the latest build of the app? Try changing something in the app that's easily verifiable, like a version number or build date that's visible in the UI.

    If you're running the latest build, and the lack of "-r" still results in a release build, then it seems like the compiler is hardcoding release mode when exporting a project anyway, and there's nothing we can really do to help you.

    I mean one extreme solution I can think of would be to build the PRGs by hand and create the IQ manually, but this would obviously not be trivial:

    - you'd have to create the IQ manifest by hand

    - you'd have to sign everything yourself

    You could probably reverse engineer all of this from an existing IQ file, but I don't know if it's worth it.

    Perhaps as a more practical solution, you could just edit your source so that the debug code runs in release. Ofc this is also obvious, but it raises the question of why you don't do it

    e.g.

    - search/replace ":debug" => ":debug2"

    - search/replace ":release" => ":release2"

    - add default excludeAnnotation to monkey.jungle for release2

  • Is this meant to be passive aggressive or sarcastic?

    Not at all, I'm sorry if you saw it that way. As I said, I tried it yesterday and failed... thinking it wouldn't work. Then I saw your post this morning (Sydney UTC+11 07:00) And so tried again. I must have had a typo earlier.

  • Do you display the build version in your app?

    Yes, I do display the version number in the app. I'm labelling each evolution separately and display the version on an opening splash screen.

  • search/replace ":debug" => ":debug2"

    - search/replace ":release" => ":release2"

    - add default excludeAnnotation to monkey.jungle for release2

    Thanks for that, If I can't get the compiler option working, that will be my next approach.

  • There's a known issue related to this

    Could you provide a link to further information on this please?