Ticket Created
over 3 years ago

CIQQA-946

device setting in launch.json ignored when running unit test in VSCode

I have a launch.json file with:

        {
            "type": "monkeyc",
            "request": "launch",
            "name": "Run on fenix 6X Pro",
            "prg": "${workspaceFolder}${pathSeparator}bin${pathSeparator}${workspaceFolderBasename}.prg",
            "prgDebugXml": "${workspaceFolder}${pathSeparator}bin${pathSeparator}${workspaceFolderBasename}.prg.debug.xml",
            "stopAtLaunch": false,
            "device": "fenix6xpro"
        },
        {
            "type": "monkeyc",
            "request": "launch",
            "name": "Run All 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": "fenix6xpro"
        }

When I hit F5 (run) for the "Run on fenix 6X Pro", all works just fine for debugging. And, I am not asked to select a device from a list, the Fenix 6X Pro is used.

BUT: When I do the same for "Run all tests" - then I am asked to select device. So, seem "device" in launch.json is ignored when running tests!