actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
435 stars 94 forks source link

can't hit breakpoint #161

Closed fesily closed 2 years ago

fesily commented 2 years ago

操作流程如下,没有任何断点的情况下,直接run,在两个循环中任意添加断点都不会停下.

所有内置的lua程序都是这样

如果在设置了stopOnEntry选项,先打断点可以停下


require "luadebug" : start "@/Users/apple/func/typescripttolua_test/out/debug.sock" :event "wait"
local fn = coroutine.wrap(function ()
    while true do
        print("1")
        coroutine.yield()
    end
end)
while true do
    fn()
end
actboy168 commented 2 years ago

VSCode的Debug Console设计上的问题,大量的数据(死循环式的print)会将它堵死。将print去掉就可以了,或者在outputCapture里取消对print的重定向

fesily commented 2 years ago

👌🏻 我补充下wiki