tomblind / local-lua-debugger-vscode

Local Lua Debugger for VSCode
MIT License
106 stars 26 forks source link

stdout is printed to console only when app exit #22

Closed vhenriet-sfy closed 4 years ago

vhenriet-sfy commented 4 years ago

When executing a simple app like:

while true do os.execute("sleep 1") print("foo") end Nothing is outputed to debug console.

When I kill the application, all printed string show in the console logs.

I'm using version 0.1.10 of the extension.

tomblind commented 4 years ago

This example will now work correctly, but note that there are other cases where output will be delayed. This is due to how the debugger works: messages are embedded in the stdout stream and have to be extracted by the vscode extension. Printing open braces { will delay output appearing until a debugger message is sent (such as a breakpoint being hit, or the program exiting).