Flex 4 WISH!! Debugging Mouse Move Events

This post is a recommendation for flex 4 or a plugin for flex builder 3…

So, I was talking with my pal John Wilker (one of the two masterminds behind 360flex conferences) and I was bitching to him saying that it’s gay when you have to debug mouse move events in flex, because you want to know what the mouse is at a certain point in the app, like dragging on something…

but it’s not like you can stop dragging on something put a debug point in your app, and then go back and drag again, because more than likely your going to then hit debuging before your mouse is where you want!!!! this makes me so angry, so i wrote a solution, but even then the solution sucks, because it’s just too much code, even though it’s only a couple functions, you just shouldn’t have to do that…

THE FIX THAT I PROPOSE

what if you could set up some kind of hot key in flex builder that when you were running the application, it skipped breakpoints? and when released it then picked up your breakpoints… so say your debug/run the app, then you go click on a list, drag it over to a tree, and you want to know what node your over, you have a debug point in the mouseMove function or whatever, and you all the while you are holding “d” on the keyboard, or something like that, and when you let up, it then hits the breakpoints like it should…

i dunno if that would even work because eclipse wouldnt have focus, so maybe thats a dumb idea that would go nowhere, but dammit, it’s bullshit!

sorry just frustrated…

6 comments on this post.
  1. Steve Schelter:

    Why don’t you try something like this?
    if(isDebugMode) enterDebugger();

    This way, you just toggle the isDebugMode flag however you want. The enterDebugger() call essentially has the same effect as a breakpoint.

  2. dominick accattato:

    why not just add the listener for the MouseEvent.MouseMove event when the user rolls over the display object you want debugging for and then remove it after the user rolls out. so:

    circle.addEventListener(MouseEvent.ROLL_OVER, onCircleRollOver);
    circle.addEventListener(MouseEvent.ROLL_OUT, onCircleRollOut);

    private function onCircleRollOver(event:MouseEvent) : void {
    circle.addEventListener(MouseEvent.MOUSE_MOVE, onCircleMouseMove);
    }

    private function onCircleRollOut(event:MouseEvent) : void {
    circle.removeEventListener(MouseEvent.MOUSE_MOVE, onCircleMouseMove);
    }

    // at this point you break only on the display object // you want and if you want to stop breaking you can // always skip your breakpoints later on.

    am I missing something?

  3. dominick accattato:

    hrmm, just re-read your post. I guess in your case, you’d actually want to add your MouseEvent.MOUSE_UP event listeners when you roll over the display object and then remove them when you roll out.

  4. aw:

    Hey, the Flex4 is out 🙂

  5. sohbet:

    hrmm, just re-read your post. I guess in your case, you’d actually want to add your MouseEvent.MOUSE_UP event listeners when you roll over the display object and then remove them when you roll out.
    http://www.sohbetvadisi.net

  6. Metal Music:

    huh :/ good post thanx

Leave a comment