【问题标题】:VSCode: "No debug adapter, can not send 'evaluate'"VSCode:“没有调试适配器,无法发送‘评估’”
【发布时间】:2020-08-26 20:20:18
【问题描述】:

我正在尝试在 VSCODE 中运行 lua 5.4 代码,但出现此错误:No debug adapter, can not send 'evaluate'。我的调试器是“Local Lua Debugger”,而 launch.json 是

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "lua-local",
            "request": "launch",
            "name": "Launch",
            "program": {
                "lua": "lua54",
                "file": "bot.lua"
            
            }
        }
    ]
}

而lua文件本身就是

print("Y/N?")
local input = io.input()
if input  == "no" then
    print("yes")
end

每次我想输入内容时都会出现错误。

【问题讨论】:

    标签: json visual-studio-code lua


    【解决方案1】:

    io.input() 供您读取外部文件,在其中传递您要读取的文件的路径。

    如果你想写一些东西并将其存储在变量中,请尝试使用io.read()

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-01
      • 1970-01-01
      • 2014-02-05
      • 1970-01-01
      • 1970-01-01
      • 2021-07-29
      • 1970-01-01
      相关资源
      最近更新 更多