如何在VS代码中启动ninja构建的基于Cocoa的macOS应用程序?

如何在VS代码中启动ninja构建的基于Cocoa的macOS应用程序?,macos,task,launch,Macos,Task,Launch,我有一个原生的基于OC/C++Cocoa的macOS应用程序,名为AppRTCMobile.app,它在ninja构建的XCode中运行良好。然而VS代码抱怨说,启动:程序“/$APP BUILD DIRECTORY$/apptcmobile.APP”不存在。 这是我的tasks.json: { "version": "2.0.0", "tasks": [ { "labe

我有一个原生的基于OC/C++Cocoa的macOS应用程序,名为AppRTCMobile.app,它在ninja构建的XCode中运行良好。然而VS代码抱怨说,启动:程序“/$APP BUILD DIRECTORY$/apptcmobile.APP”不存在。 这是我的tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build Project",
            "type": "shell",
            "command": "ninja -C out/vscode_mac_64 AppRTCMobile",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
这是我的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": [
        {
            "name": "(lldb) Launch",
            "preLaunchTask": "Build Project",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/out/vscode_mac_64/AppRTCMobile.app",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "lldb"
        }
    ]
}
尽管VS代码抱怨AppRTCMobile.app不存在,但我可以在launch.json中“program”中描述的目录中找到它,我可以用鼠标点击来运行它

我怀疑“程序”只能运行一个不支持本机基于Cocoa的macOS应用程序的命令,因此我将程序改为“打开”“args”:[“${workspaceFolder}/out/vscode_mac_64/AppRTCMobile.app”与在终端中启动macOS应用程序的普通命令相同,但是VS代码仍然抱怨不存在

我怀疑“程序”无法运行*.app,因此在tasks.json和launch.json中,我将AppRTCMobile.app更改为test\u support\u unittests,这是巨大源代码中的另一个应用程序,令人惊讶的是VS代码可以很好地运行test\u support\u unittests

因此,我怀疑当“程序”是一个本地的基于C++的COMA-MACOS应用程序时,可能会有一些特殊的设置,有人有提示吗?如果你需要更多的信息,请告诉我