Flex Debug/inspection

I just tried out the new Idea X (98.231) in the hope, that the Flex debugger now would support better inspection.
But alas....

If you have something like:

var i:Number=1;
var x:XML=<r>a</r>;

function b(event:Event):void
{
var c:XML;
c=a; // breakpoint 1 here
var d:XML;
d=c; // breakpoint 2 here
}

An event activated b.

If try to inspect (alt-F8) this.i
I get: Cannot evaluate expression: this.I
This goes for x too, only with a toXMLString() added.
If I go to breakpoint 2, I can actually inspect c.

My guess is that this is because inspection only works for expressions in this stackframe, and since b was called
by the "event machinery" it is not possible to backup the stack to get a hold of the frame that contains i or x.

But that is just a guess, of course.

The odd thing is that the expression view in the debugger will actually display the value of i!
When it comes to x it throws in the towel though.

The workaround so far, is to include code, that copies the variables you would like to inspect, to the local scope. This
of course means recompiling and is a little on the heavy side, apart of the risk of introducing errors in the code.

This is not a bug, but if someone did something about it, or even produced some kind of workaround. I for one would
be a lot less frustrated :-)

Kind regards
Henrik

10 comments

Hi Henrik!
What Flex SDK version do you use? I guess it is 3.x. Debugger from Flex SDK 4.x has better capabilities in expression evaluation. If you do not want to switch project to Flex SDK 4.x then you can use only debugger from SDK 4.x. Open Flex Run configuration (Run | Edit Configurations) and specify Flex SDK 4.x as 'Use debugger from SDK' value.

0

ooops, I forgot that!

My flex version is 4.1.0.16076
The debugger is 10.1.r82
The platform is: Linux free-kubuntu-1 2.6.28-19-generic #64-Ubuntu SMP Wed Aug 18 20:55:57 UTC 2010 i686 GNU/Linux
That is a 32 bit version.

Just ask if you want more.

Kind regards
Henrik

0

Works fine for me. I'm on Windows, but it doesn't matter
db.png

0

Actually, it might. The flashplayer for Windows and Linux is not the same.

I do not fancy installing a Windows machine and putting Idea on it just to try this though!
Especially because it will quite likely yield the result that you are getting.
Another thing I could do was to try out FDT under Linux to see if this is the same as Idea.
I think I am going to try this,
This will make it easier to take this to Adobe.

Anyone else out there got an idea about this?

Anyway, thanks so far, Alexander, I will get back to you.

KR
Henrik

0

Hi again

Sorry about the delay.

I have now tried debugging with FDT on the same platform, and it worked! Then I tried switching IDEA to
use the Flex SDK that comes with FDT. No joy. Then the standalone debugger. No joy.

The conclusion must be that there is something amiss with IDEA/Flex/Kubuntu/debugging.

Do you have any Linux machines at JetBrains? If so, how about recreating the problem on a Linux machine?

Actually it appears, that when I went to 98.231 from 95.538, I could not even inspect the local XML variables anymore!

Am I the only one tearing my hair out over this? It seems awfully quiet around here.

Should I create a bug report? It is beginning to look like one.

KR
Henrik

0

Well, IDEA uses fdb tool from Flex SDK, so if it has bugs that means that IDEA has bugs... You can create a bug report and probably we'll be able to patch fdb, but I can't promise the fix quckly.
Flex run configuration allows to select SDK to take fdb from (i.e. can be different from SDK used for compilation), so you may try to play with this to see which ави does the job better. XML evaluation should work with both SDK 3.x and 4.x, but expression evaluation is much better with 4.x.

0

Of course!

fdb is part of the puzzle too. I will try to run fdb from the command line, and perhaps figure out which fdb FDT is using.
If fdb is the culprit it seems reasonable to take the problem to Adobe. But if FDT is working they must have done something
right, so maybe a workaround is hiding in there somewhere.

KR
Henrik

0

So I tried out fdb, and yes it exhibits the same problems. The question remains: how do FDT succeed in
making this work?

I am going to report the global variable (fdb) problem to Adobe, also I will open a bug report on IDEA X/Flex/XML inspection.

KR
Henrik

0

Yes, open an issue in Adobe's tracker please, but unfortunately Adobe usually doesn't fix bugs and seem to have no interest in supporting such tools like compiler and debugger. Critical issues like this one live for ages. fdb is opensource so FDT has probably written their own debugger based on its communication protocol.

0

I get the impression that Adobe is not very active too.

It does indeed look like FDT has written their own debugger from the bottom up, nice!
How about it Jetbrains, don't you want to have a go at it too? :-)

KR
Henrik

0

Please sign in to leave a comment.