Well, I’m probably a big fat copycat for doing this, since at least two others have done similar projects recently, but it’s something I’ve wanted to do for a while, so I did it. And the finished product is so cool I couldn’t not post it.
So, here is my Flash Debug Panel.
Instructions as contained in the package:
1. Put the Debug.as file in the root level of your class path.
If you don’t know what a class path is, you’re going to have to find out on your own. sorry.
2. Run the “Flash Debug Panel.exe” file.
3. In your code, you can use the following methods and syntax:
Debug.trace(“hello world”); // any type
Debug.trace(value1, “hello”, _root); // any types separated by commas
Debug.traceObject(myComponent, n); // n is how many levels deep the trace will iterate
Debug.clear(); // clears the panel
4. In the panel, you can:
– press “Clear” to clear the panel.
– press “Save” to save contents of panel to a text file (save dialog will open).
– press “Print” to send contents of panel directly to printer (NO print dialog).
– change the font size (minimum 8).
– select “On top” to keep the panel the topmost window.
– select “Get focus” to move the panel to the top when it gets new content.
(only applicable if “On top” is not selected)
Also in the package is the fla used to create the panel in case you want to do something more with it. The .exe was made with SWF Studio. I started to use Zinc, but it didn’t seem to have support for making a window stay topmost.
As mentioned, the others who have done similar projects in the past week are hiddenresource and Robert Hoekman. Again, this is an idea I’ve had for a while, one I’d started a couple of times and never followed through with. These guys totally beat me to the punch and inspired me to finish mine. Also, all of the code and concepts are mine. I didn’t view or copy any of their source. The others also probably have some cool features that mine doesn’t, so go forth and check them out. Mine does exactly what I want it to. The others might be more suited to your workflow.
Nice tool, simple and efficient.
I’m sure you have heard about AdminTool, but if not, it’s worth to give it a try.
http://acmewebworks.typepad.com/admintool/
Cheers!
I have made a similar thing with screenweaver along time ago. It’s also using the LocalConnection:
http://trashcan.andre-michelle.com/util_unsorted/DebugConsole.zip
The worst thing is, that flash is too slow, if you are displaying a lot of rows in the output textfield.
You can find a java based debug application here:
http://sos.powerflasher.de/
which works with a XMLSocket.
well… there’s ms word, wordperfect, ami pro…
and i like the fact that all i need to do is import the class in code; which allows me to strip it out easily for production… pretty neat… thx for sharing 🙂
Zinc does support stay on top but I don’t think it allows you to turn it on and off. It’s actually in the Zinc IDE under the Size/Position Tab. There are 2 tabs at the bottom of that screen if you select Form Behaviour there is a check box for it there.
Joan, yeah, I’ve seen Admin Panel. Maybe a bit overkill for what I needed, but very nice.
Julian. I didn’t see a way to make “always on top” optional at run time. It’s really easy in SWF Studio, so I went with that. It’s pretty nice to have the option of using either one of two great tools.
I personally prefer the original log file of the flash debug player, since you can use the normal trace method and you don’t have to implement a debug class. In conjunction with afterthought, it is very powerfull.
I also came across this one last week (through Kevin Lynch’s blog): It’s nice in that you can invoke a seperate debug movie or use the inbuilt output window. The guy who wrote it speaks spanish, follow the link in Kevin’s blog to get the translated version.
http://www.kelvinluck.com/article/excellent-flash-debugging-tool
Looks great! You definately got some unique functionality there!
Really great app – I love the way it’s so easy to use whilst writing code. Spot on.