Frage

Day one HaxeFlixel Coder. Stupid error, but Google isn't helping me.

How do I trace to FlashDevelop output using Haxe, NME and Flixel. It works when executing using C++, but nothing for Flash!

I've tried

trace("hello");
Lib.trace("hello"); //With correct imports

Sorry, feeling so stupid right now!

War es hilfreich?

Lösung

The traces for the flash target appear on the player itself since flashplayer cannot redirect them to the flashdevelop output. The work-around is that use neko target while developing and once development completed, remove any traces and compile to flash.

Andere Tipps

You probably don't have a "debug" Flash Player associated with SWF files on your system. That's needed for OpenFL projects (by opposition with regular Flash projects managed by flashDevelop).

First make sure you have one installed:

  • in FlashDevelop select Tools > Install Software...
  • choose Flash Player SA (stand alone debug Flash player)
  • restart FlashDevelop.

Sadly for some complicated reason it isn't possible yet for FlashDevelop to tell OpenFL what Flash player to use even if you have it installed that way, so the next step is needed:

Associate the Flash player:

  • in FlashDevelop select Tools > Program Settings...
  • look up the path in FlashViewer plugin > External Player path
  • now in a Window Explorer, locate some SWF file and associate this player executable with SWF files,
  • when you double-click a SWF in Window Explorer it should open this program,
  • verify when you right-click on the player that it has a "Debugger" item in the context menu.

Retry launching your OpenFL project in FlashDevelop, you should see the traces in the Output.

PS: to completely disable traces for release, edit your project.xml and add:

<haxeflag name="--no-traces" />

While not specifically a solution to your problem, a tip I may have is that I have my development profile have .swf files associated w/ standalone debug flash player (Operating System wide), and build debug instead of release in Flash Develop.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top