VSCodeLuaDebug
VSCodeLuaDebug copied to clipboard
This debug tool is a good idea!
This debug tool is a good idea!
When I used the tools and add a wrong vlaue like "asdfasdf" in vscode watch, then all breakpoint will invalid. At last I find because used luadll.dll, use lualib.lib is OK, so I think it is a bug. and in vscode-debuggee.lua I think add linefeed that will be better.
if redirectPrint then
redirectedPrintFunction = _G.print -- 디버거가 떨어질때를 대비해서 보관한다
_G.print = function(...)
local t = { n = select("#", ...), ... }
for i = 1, #t do
t[i] = tostring(t[i])
--add linefeed
t[i] = string.format("%s\r\n",t[i])
end
sendEvent(
'output',
{
category = 'stdout',
output = table.concat(t, '\t')
})
end
end