1 Reply Latest reply on Jan 8, 2008 10:53 AM by BillMcVee

    Code behaves differently when run in debugger

      var he:Array = handControl.getHumanInfo(ha, handNumber);
      while (he.length != 0)

      This snippet is part of a large flash project I am working on. The program works fine by itself, but when I try to step through it in the debugger, it sometimes crashes, depending on where I put a breakpoint. If I put the breakpoint on the first line of code above, I can step into the function getHumanInfo(), trace it, and step back out, and everything is fine. But if I only put a breakpoint somewhere inside the getHumanInfo() function, all of a sudden when I step out of that function, the variable 'he' is undefined, and so the while loop never ends.

      This makes no sense to me. The code is either good or bad, it shouldn't behave differently based on where I put the breakpoint.

      The getHumanInfo() function always creates a new array and passes it back, so there is no reason 'he' should be undefined.

      This has happened many times when I've tried to use the flash CS3 debugger -- is there a known issue that this sounds like? I'm so fed up I'm ready to stop using the debugger altogether.