【问题标题】:How "to ensure proper integration between HttpRepl and Visual Studio Code."?如何“确保 HttpRepl 和 Visual Studio Code 之间的正确集成。”?
【发布时间】:2022-07-25 15:11:26
【问题描述】:

我正在尝试使用 httprepl 在我的 ASP.NET 应用程序中测试端点。当我尝试运行 POST 请求时,我的命令提示符返回:

The default editor must be configured using the command `pref set editor.command.default "{commandLine}"`.

所以我用以下命令设置它:

pref set editor.command.default "C:\Users\User\AppData\Local\Programs\Microsoft VS Code\Code.exe"

然后我收到警告:

If your default editor is Visual Studio Code, you should set the default command arguments (`editor.command.default.arguments`) to include `-w` or `--wait` to ensure proper integration between HttpRepl and Visual Studio Code.

我现在不知道该怎么办。我试过了:

pref set editor.command.default.arguments "-w"

我不确定这是否有效,但是当我尝试重复该命令以将 VS Code 设置为我的默认编辑器时,我收到了相同的警告。我说对了吗?

【问题讨论】:

    标签: c# asp.net visual-studio-code


    【解决方案1】:

    我想你可能已经想通了。但是,由于我遇到了同样的错误(使用 nodejs 和 httprepl 代替),我只是发布我的答案供其他人参考。对我来说,它与“默认编辑器”无关,我只需要在post之后添加-c "{}"即可。

    post -c "{}"
    

    祝你一切顺利,度过一个平静的一天!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-08
      • 2022-07-06
      • 1970-01-01
      • 2010-09-14
      • 1970-01-01
      • 2019-05-18
      • 1970-01-01
      • 2021-07-09
      相关资源
      最近更新 更多