【问题标题】:Configure Visual Studio and Meteor配置 Visual Studio 和 Meteor
【发布时间】:2016-09-28 04:45:39
【问题描述】:

我正在尝试使用 mac Visual Studio 来调试我的流星应用程序。我不知道如何让它在attach 模式下做任何事情。这是我正在做的事情:

1) 运行meteor debug --settings settings-development.json

2) 在launch.json文件中使用如下附加配置:

    {
        "name": "Attach",
        "type": "node",
        "request": "attach",
        "port": 5858,
        "address": "localhost",
        "restart": false,
        "sourceMaps": true,
        "outDir": "${workspaceRoot}/.meteor/local/build/programs/server",
        "localRoot": "${workspaceRoot}",
        "remoteRoot": null
    }

3) 按调试附加命令。 Visual Studio 代码底部变为棕色,表示已连接。

4) 在我的 index.jsx 文件的第一行添加断点:

        {getThirdReasons().map((reason) => (
          <Reason key={ reason._id } reason={ reason } />
        ))}

此时什么都没有发生。我可以让它在 webstorm 中工作,我应该在这里做什么?我知道我应该在 chrome 中有一个指示器,但我没有,而且我认为我不需要像 webstorm 那样安装 chrome 插件。

另外,如果有人知道如何从视觉工作室发射流星而不是附加,那也很棒。

谢谢!

【问题讨论】:

  • 你使用VS IDE还是VS代码?哪个版本?您是否使用 Visual Studio meteortools.codeplex.com 的 Meteor 工具?
  • 我用的是 vs 代码,我不使用流星工具,因为他们不提供下载,所以我认为它已经过时了。

标签: meteor visual-studio-code


【解决方案1】:

outDir 属性在我尝试使用的 VSCode 1.6.1 中已弃用。 将鼠标放在outDir 上时弹出的工具提示说:改用 outFiles 属性。

因此您可以尝试删除 outDir 对并将其替换为:

"outFiles": ["${workspaceRoot}/.meteor/local/build/programs/server/app/app.js"],

【讨论】:

    猜你喜欢
    • 2011-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多