Closed jjvbsag closed 3 years ago
It's mostly by design, as io.write
and io.stdout:write
are used less frequently and I wanted to have an alternative for some output to not be redirected. In terms of the workaround, you can probably apply the same logic to io.write
as is applied to print
(it's in mobdebug.lua on lines 1006-1020). This code intercepts the print
call and sends its content back to the IDE. Another option is to assign io.write
based on print
in your code after require "mobdebug".start()
is executed.
Thank you for you response. I will try and come back to you.
I'm struggling with capturing output. Running ZBS on a linux or Windows host (should not matter) There I have debugger.redirect = "c" in .zbstudio/user.lua set.
Doing Remote debug on an arm device basically using code sililar to this
(where push=table.insert, join=table.concat and sprintf=string.format)
Now, when debugging remote, I can see output of
print("using print")
in ZBS Output window, but I cannot seeio.write('using io.write()\n')
orio.stdout:write('using io.stdout:write()\n')
Is this an incompleteness in mobdebug? Any chance for a quick fix or workaround?