cocos2dx3.4 新建项目不能用vs BabeLua调试

时间:2023-02-08 18:22:30
cocos2dx 3.4新建lua项目,按照 http://www.cocoachina.com/bbs/read.php?tid-205043-page-1.html 的操作,没有办法进入断点.项目可以正常运行,但是把Lua插件生成的temp项目设置成启动项目时,模拟器运行就是黑屏,

这个是日志:
--------------------------------- Setting Info -----------------------------------------
Setting name:       test_lua3.4_script
Lua scripts folder: E:\test_lua3.4\src
Lua exe path:       E:\test_lua3.4\runtime\win32\test_lua3.4.exe
Working path:       E:\test_lua3.4\runtime\win32
Command line:       
----------------------------------------------------------------------------------------
E:\test_lua3.4\runtime\win32\test_lua3.4.exe 
Debugger attached to process
0x037501c0: VM created

package.path: .\?.lua;E:\test_lua3.4\runtime\win32\lua\?.lua;E:\test_lua3.4\runtime\win32\lua\?\init.lua;

Load script(0): E:\test_lua3.4\src\@Untitled1.lua  relative  (file not exist)
Load script(1): E:\test_lua3.4\src\@Untitled2.lua  relative  (file not exist)
Load script(2): E:\test_lua3.4\src\@Untitled3.lua  relative  (file not exist)
Load script(3): E:\test_lua3.4\src\@Untitled4.lua  relative  (file not exist)
Load script(4): E:\test_lua3.4\src\@Untitled5.lua  relative  (file not exist)
Load script(5): E:\test_lua3.4\src\@Untitled6.lua  relative  (file not exist)
Load script(6): E:\test_lua3.4\src\@Untitled7.lua  relative  (file not exist)
Load script(7): E:\test_lua3.4\src\@Untitled8.lua  relative  (file not exist)
Load script(8): E:\test_lua3.4\src\@Untitled9.lua  relative  (file not exist)
Load script(9): E:\test_lua3.4\src\@Untitled10.lua  relative  (file not exist)


我折腾了2天,还是没有 成功,希望能帮助下,刚开始用 vs.

最开始用VS新建3.4 lua项目时,直接黑屏,不能直接运行,每次都要刷新才行.后来在AppDelegate.cpp的bool AppDelegate::applicationDidFinishLaunching()下开始的位置添加:
    //add search paths/////////////////////////////
    string strPath = CCFileUtils::getInstance()->getWritablePath();
    vector<string> vtPath = CCFileUtils::getInstance()->getSearchPaths();

    vtPath.push_back(strPath + "res/");
    vtPath.push_back(strPath + "src/");

    CCFileUtils::getInstance()->setSearchPaths(vtPath);

在src目录下的main.lua文件中加入

package.path = package.path..";src/?.lua"

这个是配置 
cocos2dx3.4 新建项目不能用vs BabeLua调试