【问题标题】:Make Visual Studio Code use WSL/bash in the debug console on Windows使 Visual Studio Code 在 Windows 的调试控制台中使用 WSL/bash
【发布时间】:2019-03-21 08:41:54
【问题描述】:

我在 Windows 上运行 Visual Studio Code,但在 WSL/bash 上运行我的 (NodeJS/TypeScript) 应用程序。但是,我不能让 VS Code 调试控制台使用 bash。好像还在用cmd.exe。

我可以通过在 Visual Studio Code 中运行我的应用程序来测试这一点,然后在调试控制台中输入 process.platform。它显示win32

另一方面,终端确实使用 bash.exe。

我已将 terminal.integrated.shell.windowsterminal.external.windowsExec 设置为 C:\\Windows\\System32\\bash.exe

如何让 VS Code 在调试控制台中使用 bash?

【问题讨论】:

    标签: bash debugging visual-studio-code windows-subsystem-for-linux


    【解决方案1】:

    显然,我提到的设置没有效果。我只需要将"useWSL": true 设置添加到我的launch.json。

    更新 我已经切换到使用 Remote Development extension 进行 VS 代码。我已经写了here

    【讨论】:

      猜你喜欢
      • 2019-11-18
      • 1970-01-01
      • 2017-07-03
      • 1970-01-01
      • 2017-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-06
      相关资源
      最近更新 更多