Halaman

Rabu, 23 Juli 2014

[OpenFL/Haxe/HXCPP] Debugging

Playing with OpenFL is fun! mainly because of it's power for cross platform development.
Debugging program which target the flash platform is very easy, you just need the FlashDevelop software and download the flash player with the debug support

a step by step procedure to debug the "FLASH" target
  1. Open the project
  2. "Menu" »"Debug" »"Start Remote Session"
  3. Make sure you are using the "debug" configuration, and then press the "Play / Run" button
  4. Set's your breakpoints, inspect variables, etc is a snap..
If we are debugging windows target (hxcpp) this will introduce different approach, FlashDevelop currently working to support it 

But for those who like to use the command prompt, here is a step by step procedure..
  1. run "haxelib install hxcpp-debugger"
  2. on your project's application.xml add
    <haxedef name="HXCPP_DEBUGGER" />
    <haxelib name="hxcpp-debugger" />
  3. on your MAIN class file, add the import: "import debugger.Local;"
  4. on main haxe file, you need to add the function call
    new Local(true);
  5. run the program on your command prompt:
    lime test window
  6. It will run and then hit a default breakpoint, from there you should type "help" and read the documentation to proceed
  7. nice........
Haxe is quite mature, but it's cross platform nature made the debugging process which should be simple, becomes quite a challenging process, OpenFL supports html5 target, next i will try to learn on mapping js to haxe's source code using the technology source-code mappings on chrome and firefox browser..

Tidak ada komentar:

Posting Komentar