Search code examples
actionscript-3debuggingbreakpoints

Setting a breakpoint via code in Actionscript 3


Is there any statement in Actionscript 3 which acts as a breakpoint when executed? That is, something like JavaScript's "debugger" statement.

I need it when developing AS3 applications without an IDE. Setting the breakpoint manually in fdb is rather tedious.


Solution

  • Use enterDebugger function.

    import flash.debugger.enterDebugger;
    
    // code ...
    enterDebugger()
    // code ...