Open Atcold opened 11 years ago
Bug found and corrected. I changed the pattern:
"[:/\](.+)$"
in lines 561 and 565 of ~/torch/share/torch/lua/debugger/debugger.lua with:
"[:/\\](.+)$"
Right... So I required the debugger:
require 'debugger'
and placed the snippet somewhere in my code:
if _DEBUG_ then pause() end
and this is the outcome ):
torch-qlua: /Users/atcold/torch/share/torch/lua/debugger/debugger.lua:481: bad argument #1 to '(for generator)' (level out of range)
stack traceback:
/Users/atcold/torch/share/torch/lua/debugger/debugger.lua:1350: in function </Users/atcold/torch/share/torch/lua/debugger/debugger.lua:1349>
[C]: at 0x01092fee40
[C]: in function '(for generator)'
/Users/atcold/torch/share/torch/lua/debugger/debugger.lua:481: in function 'tracestack'
/Users/atcold/torch/share/torch/lua/debugger/debugger.lua:784: in function '__index'
test-edgeDetector.lua:64: in main chunk
I am not really understanding what is going on...
This issue appears to occur only when Torch is compiled with Lua-JIT
Ah thanks for looking into these bugs. LuaJIT doesn't support the \ escaper, for some reason. % must be used instead. So instead of [ , use %[. But it seems you're past this bug.
Moreover, I am not able of running commands with the < code here >
syntax. Also
show line file X Y
seams to have problems... Finally, I am not able to print the local variables... it just shows me:
[debug]> locs
upvalues = { -- table: 0x7f908db94b70
};
Am I just that unlucky? :/
OK, this debugger has never been tested correctly, and I've never really used it, so I guess it might be quite buggy. It was originally written for Lua 5.0, I think, and then adapted for 5.1. Some has to be done to make sure it does the right thing :-(