moteus / vscode-mobdebug

MobDebug Debug Adapter for Visual Studio Code
MIT License
17 stars 6 forks source link

Print while debugging #15

Open asherber opened 1 year ago

asherber commented 1 year ago

Thanks for this library -- I've tried several different Lua debugging solutions, but this one does exactly what I want for local and remote debugging.

Is there a way to get print() to show its output right away? Currently it looks like output is cached and then dumped to the debug console when the current script exits.

asherber commented 1 year ago

I've discovered that while doing local debugging with the "Run" profile, I can get printing to work with a local function:

local print = function(...) print(...); io.flush() end

But if I'm using the "Listen" profile, I can't seem to get printing to work at all -- the output doesn't even appear when the script exits.

It would be very helpful to have this working.