Skip to content

Instantly share code, notes, and snippets.

@shallaa
Created December 30, 2013 02:43
Show Gist options
  • Save shallaa/8177205 to your computer and use it in GitHub Desktop.
Save shallaa/8177205 to your computer and use it in GitHub Desktop.
trace log in browser console.
package
{
import flash.display.Sprite;
import flash.external.ExternalInterface;
public class DebugConsole extends Sprite
{
public function DebugConsole()
{
ExternalInterface.call( "eval", "var console = window.console || {log:function(){}};" );
traceLog( "test" );
}
private function traceLog(log:Object):void
{
ExternalInterface.call("console.log", log );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment