使用 cygwin 和 Visual Studio 代码在 Windows 中调试 ruby

问题描述

我在 Cygwin 中成功安装了 ruby​​ 并且

gem install ruby-debug-ide

我创建了一个简单的 2 行 ruby​​ 脚本

your_name = "Terrence"
puts "Hello #{your_name}"

和 Visual Studio 代码 ruby​​ 扩展 我从 cygwin shell 窗口中启动 vscode:

code .

我的 launch.json 看起来像这样:

"version": "0.2.0","configurations": [
        {
            "name": "Debug Local File","type": "Ruby","request": "launch","program": "${workspaceRoot}/main.rb"
        }
    ]

但是当我点击调试 我进入了 vscode 终端控制台:

Windows PowerShell
copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\cygwin64\home\foo\dev\ruby>

我需要在 vscode 中配置更多才能在 VSCODE 和 cygwin 中调试 ruby​​ 吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)