views:

961

answers:

4

I'm building a C# app which contains an interactive Flash control via AxShockwaveFlash. One of the challenges is that while I am using the Eclipse-based Flex Builder to develop the Flash controls, it only seems to give me the ability to debug the Flash control if the movie is being run standalone, directly through the Flash player. I must resort to caveman (trace) debugging if I want to debug my ActionScript code from inside my C# app, which is far less than ideal.

I saw that AxShockwaveFlash appears to provide hooks for external profiling support. I was hoping there might also be some hooks for external debugging support as well, so I could hook my Flex Builder debugger directly to AxShockwaveFlash, but nothing jumps out at me. Ideas?

+1  A: 

I am not a C# programmer so I'm not sure this will work.

You should be able to get the traces using the Flash Tracer Firefox Plugin by Sephiroth. There are few things to setup right before getting the traces though:

1.Make sure you're using the Debug version of the Flash Player Plugin in Firefox. An easy way to check is to see if the isDebugger property is true in the list of properties displayed here(scroll to the swf at the bottom of the page).

2.Make sure you have a text file called flashlog.txt on your hdd at this location: %homepath%\Application Data\Macromedia\Flash Player\Logs. The Logs folder might not exist by default so you'll need to create it and add an empty flashlog.txt file there.

3.Once you've got the right player and the extension installed, configure the extension to point to flashlog.txt. You can do that using the Preferences button on the bottom right of the extension panel.

Restart the browser, just in case and open the Flash Tracer Panel. If you have any flash content that traces things out, you should get the trace. If you get too many traces too fast, that might crash your browser, so make sure you clear the traces from time to time and make use of the pause button.

Another idea would be using the Remote Debugger that you should be able to trigger using the Debugger option in the Right Click menu of you Flash content, in case the right click menu gets displayed ( I don't know how Flash content looks/runs in a C# app). I haven't tried used that option too much and as far as I remember the swf file should be remote, so I'm not sure how much can that help.

Hope I could lend a hand. Good luck.

George Profenza
Nope. I have trace working already inside my C# app, as mentioned. The Remote Debugger context menu is not available from an AxShockwaveFlash control like it is in a web browser, unless there is a magical incantation I am unaware of to enable it.
Not Sure
+1  A: 

Are you sure you have the AX Debug version installed and that's what your app is using?

If you're in a non-IE browser, then it won't be using the AX version of the player, so your comment to GProfenza: "...like it is in a web browser" might not hold.

Does Flash in IE show the debugger menu?

spender
A: 

Try deMonster's Monster Debugger. It's an AIR app that allows live debugging of apps in Flash, Flex, Browsers and so on. Just export a client class from the AIR app and instantiate it in your root class. Then you can profile classes, objects, traces, etc.

http://demonsterdebugger.com/

Typeoneerror
A: 

As Spender pointed out below, you probably need to install the ActiveX "content debugger" player. It allows you to debug Flash movies running in IE from Flex Builder or the Flashing authoring tool. So presumably the ActiveX content debugger will debuggable from your C# application, too.

cpeterso