C# – Debugging AxShockwaveFlash

apache-flexaxshockwaveflashcflashnet

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?

Best Answer

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.

Related Topic