Require not resolved by Decoda?

cpalomocpalomo Members Join Date: 2009-10-29 Member: 69169Posts: 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:
* @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();
  // 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
  return 0;

Lua files:

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

print("entered foo2")
function f_foo2()
  print("f_foo2 called")

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]


Sign In or Register to comment.