Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code 如何在Visual Studio代码中添加多个生成任务?_Visual Studio Code_Haxe - Fatal编程技术网

Visual studio code 如何在Visual Studio代码中添加多个生成任务?

Visual studio code 如何在Visual Studio代码中添加多个生成任务?,visual-studio-code,haxe,Visual Studio Code,Haxe,我正在尝试使用VisualStudio代码构建一个Haxe项目。我希望有两个构建命令,一个使用-debug选项构建,另一个不使用-debug选项构建。以下是my tasks.json文件代码: { "version": "2.0.0", "tasks": [ { "type": "lime", "command": "test", "group": { "kind": "build", "i

我正在尝试使用VisualStudio代码构建一个Haxe项目。我希望有两个构建命令,一个使用-debug选项构建,另一个不使用-debug选项构建。以下是my tasks.json文件代码:

{
"version": "2.0.0",
"tasks": 
[
    {
        "type": "lime",
        "command": "test",
        "group": {
            "kind": "build",
            "isDefault": true
        }
    },
    {
        "label": "build: flash",
        "command": "haxelib",
        "group": {
            "kind": "build",
            "isDefault": true
        },
        "args": [
            "run",
            "lime",
            "build",
            "flash",
        ],
        "problemMatcher": [
            "$haxe-absolute",
            "$haxe",
            "$haxe-error",
            "$haxe-trace"
        ]
    },
    {
        "label": "debug: flash",
        "command": "haxelib",
        "args": [
            "run",
            "lime",
            "build",
            "flash",
            "-debug",
            "-Dfdb"
        ],
        "problemMatcher": [
            "$haxe-absolute",
            "$haxe",
            "$haxe-error",
            "$haxe-trace"
        ]
    }
]
}

这给了我两个任务,分别是“lime:testflash-debug”和“build:flash”。“lime:testflash-debug”命令运行得很好,但是当我运行“build:flash”时,什么也没有发生。haxelib命令显示在终端中,但没有弹出任何内容。我已经阅读了tasks文档和tasks.json模式,但仍然不知道如何做到这一点。谁能告诉我怎么做?谢谢。

不应该弹出任何内容-该任务运行
lime build
命令
build
只编译应用程序,它不运行它(与
test
不同)。如何使它弹出?我尝试将“test”添加到“args”列表中,但出现了一个错误,即“在使用“build”命令时,您必须指定一个“project.xml”文件或指定另一个有效的项目文件。还有,标签为“debug:flash”的命令会发生什么情况?没有“test”参数。您根本不需要处理tasks.json,您可以在状态栏中在目标之间切换。也许阅读会澄清一些事情。状态栏的设置做了我想做的,谢谢。