Flashsavvy, John and Laurie,

I somehow missed your responses but picked them up today. Thank you. Food for 
thought!  I'm using AS2. I can't imagine the AS3 debugger being any better. I 
came back to the subject to let you know how I got on since I found something 
of interest.

I was trying to understand someone else's code and finally cornered the bug to 
this...
class Point
{
   var m_x:Number=0, m_y:Number=0;
   var my_Length:Number=0;
   var Changed:Boolean=true;

   function Point (x, y) { // this calls x() and y()
      m_x = Number(x);
      m_y = Number(y);
      // Two lines added later to fix the problem...
      // Changed= true;
       // this.length();
    }
    function get x() {
       return(m_x);
   }
    function set x(n) {
       m_x = Number(n);
       Changed= true;
   }
   function get y() {
      return(m_y);
   }
   function set y(n) {
     m_y = Number(n);
     Changed= true;
   }
   function get length() {
     var len:Number=0;

     if (Changed== true) {
        Changed= false;
        my_Length = Math.sqrt((x * x) + (y * y)); // calls: x(), x(), y(), y()
         len=my_Length;                                        // saved
     }

     return len;
  }

etc

Consider a Point variable  pt:Point(100,200). This generates calls to x() and 
y() as expected. But the debugger intialisation of pt causes an uneccessary 
call to pt.length() and this inappropriately reset the variable Changed. Why 
are getters and setters called uneccessarily by the debugger?

John


----- Original Message ----- 
From: "Laurie Jensen" <[EMAIL PROTECTED]>
To: <flashcoders@chattyfig.figleaf.com>
Sent: Monday, July 02, 2007 11:58 PM
Subject: RE: [Flashcoders] Flash Debugger's not up to it.


> I use the Flash CS3 debugger a lot, second only to trace statements for
> debugging.  I set breakpoints and view variables (including the hierarchy)
> and their properties and I can step through code.  It's a valuable tool.
>
> Laurie Jensen
> Ross Learning Media
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of John Grden
> Sent: Tuesday, 3 July 2007 7:00 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] Flash Debugger's not up to it.
>
> well, I have yet to see any properties show up in the debugger (well, I
did
> see it once, but haven't since then).  I'm not an authority on the flash
> debugger by any means.  In fact, I wrote Xray without even touching the
IDE
> debugger.  Only later did I go back to see what it was capable of when
> someone asked for a comparison.
>
> looking over the article, I skimmed it really, but I saw alot of info
about
> step in/out/over and breakpoints in general, then something about changing
> properties at runtime.  Xray's never been able to do breakpoints, but it's
> been dynamically executing actionscript since MX days (IE: you could
change
> "ringo starr" to "ozzy osbourne" back then at runtime with Xray).
>
> But I have nothing against the IDE debugger by any means, and since Peter
> wrote the article, I'm more inclined to think there's something
substantial
> there that wasn't there before.
>
> Xray's focus, too, hasn't really been logging, though it started out as a
> logger that recursed my objects :)  it's more of a tool for "flashers" in
> general to find out what in the world their visual application is doing
and
> why.  So, when you get into creating grid lines, controlling sound/video,
> filters and executing actionscript at runtime that's not compiled with the
> swf, Xray is in a different category altogether (IE: not only changing
> properties, but calling methods, reflection etc).
>
> Now, going into AS3 is really a different ball game for Xray.  It's not
> going to try and shove an AS2 expectation into an AS3 world, and that's
why
> I'm not just throwing out a connector right away (actually, I'm thinking
of
> releasing what I do have since it works and I've been using it since last
> year).
>
> anyway, that's my 2 cents :)
>
> I'll definitely try and use the new debugger though - if it's good and
it's
> easier to use than Xray, Amen.
>
> On 7/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > john,
> >
> >   just curious, in this case are you using as3 in cs3?
> >
> >   i ask because the flash cs3 promo material touts a new "advanced
> > debugger" "consistent with the flex builder 2 debugger".
> >
> >   personally, i never found any use for the debugger in flash 8
> > or  earlier.  i do find useful the debugger in flex builder 2.  i have
> > not  yet tried the debugger for as3 in cs3.
> >
> >   i do see this article up on devnet regarding the as3 debugger in cs3:
> >
> >   introducing the actionscript 3.0 debugger
> >     by peter elst
> >     http://www.adobe.com/devnet/flash/articles/as3_debugger.html
> >
> >     has anyone here tried out the cs3 as3 debugger?  can anyone
> > offer  feedback whether you have find the cs3 as3 debugger of any use?
> >
> >   p
> >
> >
> > John McCormack <[EMAIL PROTECTED]> wrote:  I am getting increasingly
> > frustrated trying to debug in the Flash IDE.
> >
> > I  see some, but not all of the variables I expect to see as I
> > step  through code. Also, when I step to the next line I step to
> > some  unexpected line.
> >
> > A google search throws up: trace(), step  over/into/outof and our
> > wonderful Xray but nothing on making the Flash  debugger do a proper
job.
> > Perhaps I am missing something. Can anyone  throw any light on this
> > inadequate behaviour?
> >
> > In desperation.
> >
> > John
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to