Can't step into program "The source code for this script is not available..."
Danger Code
Join Date: 2008-11-16 Member: 65470Members
in Decoda
I've tried using Decoda today, and I'm running into a problem. I've set up a very simple C++ app that runs a Lua script.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// lua_test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#pragma comment(lib, "lua5.1.lib")
int _tmain()
{
lua_State* L = NULL;
L = lua_open();
luaL_openlibs(L);
luaL_dofile(L, "test.lua");
lua_close(L);
/* pause */
printf("Press any key.");
_getch();
return 0;
}<!--c2--></div><!--ec2-->
And no matter what I try I keep getting this messge when I hit F11 to step into the program ...
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->The source code for this script is not available. To view script source code,
the script file must be added to the current project, or the debugger must be
attached when the client loads the file.<!--QuoteEnd--></div><!--QuoteEEnd-->
I most be doing something incredibly stupid. But I have tried all sorts of different things with the project settings and the path of my lua script file. My application *does* run if I continue debugging (F5) but I can't trap any break points.
Any suggestions?
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// lua_test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#pragma comment(lib, "lua5.1.lib")
int _tmain()
{
lua_State* L = NULL;
L = lua_open();
luaL_openlibs(L);
luaL_dofile(L, "test.lua");
lua_close(L);
/* pause */
printf("Press any key.");
_getch();
return 0;
}<!--c2--></div><!--ec2-->
And no matter what I try I keep getting this messge when I hit F11 to step into the program ...
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->The source code for this script is not available. To view script source code,
the script file must be added to the current project, or the debugger must be
attached when the client loads the file.<!--QuoteEnd--></div><!--QuoteEEnd-->
I most be doing something incredibly stupid. But I have tried all sorts of different things with the project settings and the path of my lua script file. My application *does* run if I continue debugging (F5) but I can't trap any break points.
Any suggestions?
Comments
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// lua_test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}
#pragma comment(lib, "lua5.1.lib")
int _tmain()
{
lua_State* L = NULL;
L = lua_open();
luaL_openlibs(L);
luaL_dofile(L, "test.lua");
lua_close(L);
/* pause */
printf("Press any key.");
_getch();
return 0;
}<!--c2--></div><!--ec2-->
And no matter what I try I keep getting this messge when I hit F11 to step into the program ...
I most be doing something incredibly stupid. But I have tried all sorts of different things with the project settings and the path of my lua script file. My application *does* run if I continue debugging (F5) but I can't trap any break points.
Any suggestions?<!--QuoteEnd--></div><!--QuoteEEnd-->
Everything you are doing looks correct. Can you send your application to max@unknownworlds.com?
And i also meet this error ,but when i change the lua vesion from 5.1 to 5.0 ,the error has gone.Is the Decoda does not support Lua 5.1?
I'will mail my code to you.i'm glad to see your reply.
sorry for my poor english.O(∩_∩)O
And i also meet this error ,but when i change the lua vesion from 5.1 to 5.0 ,the error has gone.Is the Decoda does not support Lua 5.1?
I'will mail my code to you.i'm glad to see your reply.
sorry for my poor english.O(∩_∩)O<!--QuoteEnd--></div><!--QuoteEEnd-->
Decoda does support Lua 5.1, although we're starting to see some reports about problems with the most recent patch Lua 5.1.4. Is that the version you tried?
Yes, I sent my app your way (and thanks for getting back).
It sounds like you don't need it though. Like Chaos Dragon I am using 5.1.4 supplied by <a href="http://luaforwindows.luaforge.net/" target="_blank">Lua For Windows</a> (version 5.1.4.18).
This error can be avoid if you use the static link lib.Don't use the lua for windows(it's dynamic link library).Download the lua static link library from luabinaries.luaforge.net