axmol/cocos/scripting/js-bindings/script/debugger
Allen Lee 7c298bdcd7 misspelling check on cocos directory (#16522)
Misspelling fix on some comments,
cocos/editor-support/cocostudio/CSParseBinary_generated.h
fix misspelling postion -> position
2016-09-06 10:14:14 +08:00
..
actors misspelling check on cocos directory (#16522) 2016-09-06 10:14:14 +08:00
core Update js bindings & js tests. 2015-05-05 10:50:19 +08:00
webconsole misspelling check on cocos directory (#16522) 2016-09-06 10:14:14 +08:00
DevToolsUtils.js can use new firefox version to debug cocos2d-x jsb projects 2016-01-15 11:39:17 +08:00
README.md Update js bindings & js tests. 2015-05-05 10:50:19 +08:00
event-emitter.js can use new firefox version to debug cocos2d-x jsb projects 2016-01-15 11:39:17 +08:00
main.js Fix some typos in comments and strings (#16290) 2016-08-02 15:29:23 +08:00
transport.js support webconsole 2016-01-15 18:05:59 +08:00

README.md

Remote Debugging By Using FireFox

Requirement

  • Firefox: From v24

How To Use

Prepare

Please refer to https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging .

Enable Debugger Support For Your JSB Project

bool AppDelegate::applicationDidFinishLaunching()
{
    ...
    
    ScriptingCore* sc = ScriptingCore::getInstance();
    sc->addRegisterCallback(register_all_cocos2dx);
    sc->addRegisterCallback(register_all_cocos2dx_extension);
    sc->addRegisterCallback(register_cocos2dx_js_extensions);
    sc->addRegisterCallback(jsb_register_chipmunk);
    sc->addRegisterCallback(register_all_cocos2dx_extension_manual);
    sc->addRegisterCallback(register_CCBuilderReader);
    sc->addRegisterCallback(jsb_register_system);
    sc->addRegisterCallback(JSB_register_opengl);
    
    sc->start();
    
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
    sc->enableDebugger();   // Enable debugger here
#endif

   ...
}

Run your game.

Open Firefox And Follow The Step As Follows

pic 1 pic 2 pic 3 pic 4 pic 5 pic 6