Require not resolved by Decoda?

cpalomocpalomo Join Date: 2009-10-29 Member: 69169Members Posts: 3
edited October 2009 in Decoda
Hi all,

Decoda seems not to be able to resolve require calls in Lua files in a very simple app.

C++ Source:
CODE
/**
* @author ;  CESAR - [email protected]
* @brief ;   Simple test for decoda debugger: create Lua state, open libs, dofile and close state.
*/
extern "C" {
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
}
int main (int argc, char** argv)
{
  // create Lua state and open libs
  lua_State* L = lua_open();
  luaL_openlibs(L);
  // do lua file
  char luafile[] = "foo1.lua";
  if (luaL_dofile(L, luafile))
  {
    printf("Could not load file, aborting. Error: %s\n",lua_tostring(L,-1));
    return 1;
  }
  // close Lua state
  lua_close(L);
  return 0;
}

Lua files:

[foo1.lua]
CODE
print("entered foo1")
require "foo2"                            -- decoda should get to foo2.lua when F11 get pressed in this line
f_foo2()


[foo2.lua]
CODE
print("entered foo2")
function f_foo2()
  print("f_foo2 called")
end

Tested creating the application both in Visual Studio 2005 and 2008 with pdb creation. Decoda version 1.12 (build 1030).
Created a project in Decoda and added existing lua files to it. Using Lua 5.1.4.

My problem: debugging of the application starts (breakpoints in foo1.lua are reached), but when I get to the require line ( require foo2.lua ), I get the message "The source code for this script is not available...". Nor a breakpoint in foo2.lua is reached (since the source file is not recognized as belonging to the debug session).

By changing the VS project config so as not to generate the pdb file, F11 begins to work in the mentioned line: decoda nows seems to be able to resolve the file name at require call.
The big problem is that I need to debug both C++ and Lua simultaneously, so the pdb file is mandatory.

Am I missing something here? Does Decoda need any additional information to resolve correctly the require calls when using a pdb file?
-- cesar palomo
[email protected]

Comments

Sign In or Register to comment.