1. Jon S Akhtar
  2. Lua For IDEA
  3. Issues


Issue #111 new

Debugger crashes when stepping into a tail-call.

created an issue

Title pretty much says it all. Remdebug crashes upon stepping into a tail-call because of the way getfenv() handles tail-call environments.

Test case:



local function a() print("in a"); end

local function b() print("in b, going to a"); return a(); end

b(); }}}

Output: {{{


Debugger connected at / /usr/local/bin/lua -e "package.path=[[/home/jason/.IdeaIC11/config/plugins/IDLua/remdebug/?.lua;]] .. package.path" -l remdebug /home/jason/workspace/LBI/src/wtf.lua in b, going to a /usr/local/bin/lua: ...11/config/plugins/IDLua/remdebug/remdebug/engine.lua:85: no function environment for tail call at level 4 stack traceback: [C]: in function 'getfenv' ...11/config/plugins/IDLua/remdebug/remdebug/engine.lua:85: in function 'fill_callstack' ...11/config/plugins/IDLua/remdebug/remdebug/engine.lua:235: in function <...11/config/plugins/IDLua/remdebug/remdebug/engine.lua:210> /home/jason/workspace/LBI/src/wtf.lua:6: in function </home/jason/workspace/LBI/src/wtf.lua:5> (tail call): ? /home/jason/workspace/LBI/src/wtf.lua:14: in main chunk [C]: ?

Process finished with exit code 1 }}}

Comments (3)

  1. Jason P

    Over a year later, it's kind of sad to see this ignored. Tail-calls are an important feature of Lua. I use tail-calls frequently, so this is a quite an annoyance in using the IDEA Lua plugin.

    Anyway, a switch to MobDebug would probably be for the best. It is under active development and supports LuaJIT.

  2. Log in to comment