A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: [disc] debugger

  1. #1
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002

    [disc] debugger

    i thought i might have a go at a debugger. something where i could add one line at the start of my movie and then let it sit there quietly until i needed it. even if it's online and in a browser.
    my questions are;
    a: i'm pretty sure this has been done before but i can't remember the link. anyone have it handy?
    b: i would like this to be a real GAME focused debugger so i'm asking for suggestions.
    this is what i have so far;

    ok it's a simple list but i figure i can do the following;
    a: pause the movie (except for listeners and timer events, any suggs here would be appreciated)
    b: watch or trace a variable
    c: step
    b: break on variable change or specific condition
    d: show the bounding box of an mc (see image, bottom, middle)
    e: debugger is loaded by adding one line to the start of the movie (easy as)
    f: dynamically resolve a referene (ie. you key in the reference and the debugger shows you the value)
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  2. #2
    SaphuA SaphuA's Avatar
    Join Date
    Oct 2002
    Location
    The Netherlands
    Posts
    2,182
    I might sound stupid, but I'm not realy understanding your question. What exactly are you asking for? The best way to create some kind of debugger?

  3. #3
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    i'm askin what kinna functionality you would like to see in a debugger.
    for example;
    i reckon about 40% of noob questions here are coz they have attached a movie with the same depth. the debugger could check the depth of all mc's within an mc and if any two mc's had the same depth then the debugger would display a warning message.
    example2:
    it always pisses me of when i'm running my movie and i figure my problem might be with one particular variable. with this i can just call up the debugger and watch the variable. no going back to trace the variable
    so think like this;
    in the past, when i've been in the middle of running a movie and i had a hunch about what might be wrong with it and some idea of what variables are involved. what would have been the best way to debug my problem (like the bounding box thing. i can't remember how many times i've re-coded that particular function to debug a movie) a.k.a a feature for this debugger
    Last edited by BlinkOk; 07-15-2005 at 07:53 AM.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  4. #4
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    What a great idea!

    The only thing I'd like to see ( Aside from variable tracing, which is the thing I need to check the most ) is being able to see mc properties, _x, _y, _visible etc.

    That would be sex.

    Squize.

  5. #5
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    have a look in the window;
    p(x,y) is the position
    d(w,h) is the width and height
    s(w,h) is the xscale and yscale
    the darker icons mean _visibility is false
    i'm gonna add f(c/t) which is _currentframe and _totalframes
    all these values are integers but i would have a properties window ehere you could see the fp values
    ..
    ps: any really clever layout suggs would be most helpful
    Last edited by BlinkOk; 07-15-2005 at 08:05 AM.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  6. #6
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,361
    That's a really great idea, I like it a lot.

    In might also be good to display the x max and y max, if you aren't already, even if you do show the x position and width.

    Also being able to set a frame rate at any given time might be a good idea(Similar to step I believe(if I'm interpreting that right), but over a period of time).

    Looking good!

    P.S. If a variable returns undefined, you could have a backwards check to show(If it is a property of an object who is the property of an object etc...)what is the first parent that exist.

  7. #7
    383,890,620 polygons nGFX's Avatar
    Join Date
    Oct 2002
    Location
    Germany / Ruhrgebiet
    Posts
    902
    great thing.

    too bad this has to be done by a game coder instead of beeing a feature of the player ... (yes, i know flash has it's own debugger, but face it, it is crap)

    nGFX

  8. #8
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    ug: x and y max and min are cool i think the tree structure will tell the dude when a reference id undefined but when they key in a reference a dump of the parte would be cool if it doesn't exist
    ng: yeah i'm with you but hey we can tailor make this succa to our own needs.
    -----------------------------------
    so think of a real bastard of a problem that you've had in the past and the ways that you've solved it. what did you do? how did you present the data? mabey we can incorporate those techniques into the debugger
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  9. #9
    383,890,620 polygons nGFX's Avatar
    Join Date
    Oct 2002
    Location
    Germany / Ruhrgebiet
    Posts
    902
    usually when something is not working like i've expected i drop in a trace with the instance name of the mc (or the "compiled" name like "Tile_0000_mc")

    Mostly this resolves to a typo ... that's my most common error in flash.

    so seeing whats actually on stage (with it's name) would help alot.

    nGFX

  10. #10
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    yeah mabey a tag up the top of the bounding box (in the image bottom middle) that has the mc's name.
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  11. #11
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,361
    You could also have a variable spell check of sorts, even though you can find out where you went wrong with tracing and what not, if a variable is undefined, it could run a check and find other variable names that are similar, (1-2 letters changed or added) and show the possible mistake. I'm not sure if it is worth it, be another idea.

    P.S. It took me awhile to figure out ug equaled UnknownGuy (I was wondering why you were saying ug... )

  12. #12
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    cool ug. i'm not sure if it can help with undefined references coz they just don't get compiled and there's no way i can get at them but i can understand that undefined references are a mighty BIG problem in terms of wasted time. we just have to think of a clever way of finding them.
    ps: on the ug thing there is a cricketer over here called brett lee (who the girls say is quite cute). he has a brother that plays cricket as well and his nick name is "ug"...just a joke
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  13. #13
    Untitled-1.fla strille's Avatar
    Join Date
    Mar 2001
    Location
    Sweden
    Posts
    1,626
    It's a good idea and could turn out to be a very useful tool!

  14. #14
    Senior Member mbenney's Avatar
    Join Date
    Mar 2001
    Posts
    2,744
    This looks great! Maybe it could just throw a simple list of all the objects or variables that are undefined or null

  15. #15
    -= phil =- d3s_inc's Avatar
    Join Date
    Oct 2002
    Posts
    610
    Sounds cool. Like it.

    When I get home I could take a look at finding undefined references and such.

  16. #16
    Senior Member random10122's Avatar
    Join Date
    Mar 2002
    Location
    Sheffield, UK
    Posts
    1,747
    Sorry, dont have any more ideas yet... just wanted to chip in my support, to add this in as an include in every project would be bliss :-)

    fracture2 - the sequel
    fracture - retro shooter
    blog - games, design and the rest

    "2D is a format, not a limitation" -Luis Barriga

  17. #17
    Senior Member random10122's Avatar
    Join Date
    Mar 2002
    Location
    Sheffield, UK
    Posts
    1,747
    Oh, also - how are you coding this? OOP? That would be ideal so that people with sufficient knowledge could add functionality, making it truely open source!

    fracture2 - the sequel
    fracture - retro shooter
    blog - games, design and the rest

    "2D is a format, not a limitation" -Luis Barriga

  18. #18
    ism BlinkOk's Avatar
    Join Date
    Aug 2001
    Location
    , location, location
    Posts
    5,002
    i'm just workin on a plugin structure and registry so you can add you own debug functions.
    still would like some layout ideas (i like the undefined list, i'll put that in);
    Graphics Attract, Motion Engages, Gameplay Addicts
    XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro

  19. #19
    -= phil =- d3s_inc's Avatar
    Join Date
    Oct 2002
    Posts
    610
    Oh. How about a little box, or something, that will list newly created variables, and tell you where they were created, and when (not sure how to define when, maybe in mater of seconds, or frames, or both...).

    So lets say my movie is running, and suddenly I created a new movieclip or something which created some new variables. I would love to be notified of that.

  20. #20
    avatar free
    Join Date
    Jul 2002
    Location
    UK
    Posts
    835
    Am I the only one who finds the built in debugger extremely useful? Especially breakpoints and following the code line by line. Maybe a habbit from my MATLAB days though. I especially miss the "mouse-over a variable in the code to see it's current value", if that was in something for flash I would cream myself. ( unless it's in the MX2004 debugger? )

    Found this from bit-101 which has some more links in the comments. One of these you were thinking of?

    One of my personal recurring bugs is re-using and accidently overwriting a variable name becasue of non-case-sensitivity. I know I should name vars better but still, if I accidently overwrite D with d it would be great to have a warning.

    I think dynamic debugging is what is missing from the built-in debugger. What I mean by that is, you always have to start the debugger from the beginning of the movie, and once you quit, you can't go back into debug mode if you spot a problem. This debugger of yours, BlinkOk, looks like it'll be real handy in that respect.

    The ability to step back a few frames before the bug would be sweet, but I guess player history would be really hard to do...
    jonmack
    flash racer blog - advanced arcade racer development blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center