3

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?

Not Sure
  • 5,873
  • 3
  • 23
  • 29
  • If you run an instance of fdb from a command prompt and execute 'run' so that it will wait for a Flash player to connect and then run your C# app, what happens? I ask because I've done that many times without failure with a C++ project which hosted the Flash ActiveX control. – imaginaryboy Apr 12 '09 at 05:11
  • fdb just sits there with "Waiting for Player to connect". Could you give me more info on your C++ project, perhaps there's some detail that could help me? – Not Sure Apr 13 '09 at 21:09
  • After creating the ActiveX control via the ProgID "ShockwaveFlash.ShockwaveFlash" I'm not doing anything special with it aside from setting the background color and flash vars properties to values that are specific to my application's needs. So long as I have the debug version of the Flash Player ActiveX registered and the .swf compiled for debugging there's no special handling I've had to do. I've also never used Flex Builder to know if there's something specific to that work flow. – imaginaryboy Apr 17 '09 at 20:38

4 Answers4

1

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
  • 50,687
  • 19
  • 144
  • 218
  • 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 Apr 13 '09 at 18:25
1

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
  • 117,338
  • 33
  • 229
  • 351
0

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
  • 55,990
  • 32
  • 132
  • 223
0

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.

Community
  • 1
  • 1
Chris Peterson
  • 2,377
  • 1
  • 21
  • 24