actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
439 stars 95 forks source link

io.read() doesn't work #41

Closed oddman621 closed 5 years ago

oddman621 commented 5 years ago

img

When I try to use io.read() and debug with it, it doesn't work well. My expectation is

what's your name? asd Hi asd

But result is not. I don't know why the output is like that. Is this the problem, or is there no way to debug with it?

actboy168 commented 5 years ago

Debug Console is not a terminal.

        {
            "type": "lua",
            "request": "launch",
            "name": "Launch",
            "program": "${file}",
            "console": "externalTerminal",
            "outputCapture": [
            ]
        }

You can use this config to get the results you want.

oddman621 commented 5 years ago

Oh, I see. Thanks for your rapid response.