小编Dib*_*era的帖子

如何从 VS Code Terminal 执行两个命令?

我必须从 VS Code 终端执行以下命令。我在 Windows 10 机器上运行我的应用程序。

set DEBUG=app & node app.js
Run Code Online (Sandbox Code Playgroud)

当我运行上述命令时,终端给了我以下错误消息。

    At line:1 char:15
   + set DEBUG=app & node app.js
   +               ~
   The ampersand (&) character is not allowed. The & operator is reserved for 
   future use; wrap an ampersand in double quotation marks
   ("&") to pass it as part of a string.
    + CategoryInfo          : ParserError: (:) [], 
      ParentContainsErrorRecordException
    + FullyQualifiedErrorId : AmpersandNotAllowed
Run Code Online (Sandbox Code Playgroud)

但是,当我分别从命令窗口运行相同的命令时,它会按预期正常执行。

node.js visual-studio-code

7
推荐指数
1
解决办法
2003
查看次数

标签 统计

node.js ×1

visual-studio-code ×1