COMMUNITY

Error Tracking

Hi,

Coming from an AS3 background, I am new to the Haxe platform. As many of you know, Flash support in Chrome is going to end soon. I need to convert my Starling AS3 app to Haxe OpenFL. I want to be able to deploy my app from a single codebase to HTML, iOS, and Android.

I did my research and found almost all replacements except one thing. I want to use external error tracking software like Sentry or Bugsnag.

First of all, if I export to HTML, can I use JS libraries and call their methods from Haxe? In AS3, there is an ExternalInterface that lets me do it.

Let’s say I have managed to handle it in HTML, how am I going to track errors in iOS and Android?

Thanks for your help.

AFAIR OpenFL’s ExternalInterface works for HTML5 too. You better ask OpenFL related questions at OpenFL community

Despite the framework you use, you can execute any JS code with js.Syntax.code when targeting JS.

Though it’s usually preferable to make externs for the library in question. Often they can even be auto-generated.

Thank you both for the answers. @Gama11 what do you mean by preferable?

Well, with js.Syntax.code() you lose type safety.

1 Like