在浏览器中运行时查看Flash的trace()
在任何浏览器中运行时查看 Flash/Flex 电影的 trace()
输出的简单方法是什么?
What's an easy way to see the trace()
output of Flash/Flex movies when running in any browser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
下载并安装 Flash Player 的内容调试器版本。
通过添加 mm.cfg 文件来启用跟踪日志记录(官方指南)
:保存 mm.cfg 取决于操作系统:
/Library/Application Support/Macromedia
%HOMEDRIVE%\%HOMEPATH%
/ home/用户名
日志文件 flashlog.txt 可在以下位置找到:
C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs
C:\Users\用户名\AppData\Roaming\Macromedia\Flash Player\Logs
/Users/用户名/Library/Preferences/ Macromedia/Flash Player/Logs/
/home/username/.macromedia/Flash_Player/Logs/
或者,您可以安装 Firefox 插件 FBTracer 在 Firebug 面板。
Download and install the content debugger version of Flash Player.
Enable trace logging (official guide) by adding an mm.cfg file:
Where to save mm.cfg depends on the OS:
/Library/Application Support/Macromedia
%HOMEDRIVE%\%HOMEPATH%
/home/user name
The log file, flashlog.txt, can be found at:
C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs
C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs
/Users/username/Library/Preferences/Macromedia/Flash Player/Logs/
/home/username/.macromedia/Flash_Player/Logs/
Optionally, you can install the Firefox add-on FBTracer which displays the trace output in a Firebug panel.
我只是使用 console.log 函数(大多数最新的浏览器都实现了它);
i just use the console.log function (most recent browsers implement it);
查看 De Monster 的 MonsterDebugger。 您可以在可爱的 AIR 应用程序中调试跟踪对象、轨迹和显示链。 使用起来非常有趣。 而且它是开源的!
http://demonsterdebugger.com/
您还可以配置 Flash 和 Flex 以写入日志文件。 在此处查看如何执行此操作:
http://livedocs .adobe.com/flex/3/html/help.html?content=logging_04.html
我最近一直在使用 Monster,但我曾经有一个在 flashlog 文件上运行 unix“tail”的别名这将有效地为我提供一个用于“浏览器内”跟踪的日志记录窗口:
或者如果您有日志查看器(如 Mac OS 上的控制台),您可以在那里查看日志。 我建议这些选项的唯一原因是 FlashTracer 相当“糟糕”;)
Check out De Monster's MonsterDebugger. You can debug track objects, traces, and display chains in a lovely AIR application. Very fun to use. And it's open source!
http://demonsterdebugger.com/
You can also configure Flash and Flex to write to a log file. Check out how to do that here:
http://livedocs.adobe.com/flex/3/html/help.html?content=logging_04.html
I've been using Monster lately, but I used to have an alias that ran a unix "tail" on the flashlog file that would effectively give me a logging window for "in browser" tracing:
Or if you have a log viewer (like Console on Mac OS), you can view the log there. The only reason I suggest these options is that FlashTracer is pretty "crashy" ;)
如果您想要一个基本的日志文件查看器,Vizzy 会让您的生活变得更轻松。 您只需安装调试播放器,然后安装 Vizzy。 它是一个跟踪 flashlog 文件的窗口。 令人高兴的是,它可以为您完成所有 mm.cfg 文件 bs。
http://code.google.com/p/flash-tracer/
Vizzy makes life easier if you want a basic logfile viewer. You just install the debug player and then install Vizzy. It is a window that tails the flashlog file. The sweet thing is that is does all the mm.cfg file b.s. for you.
http://code.google.com/p/flash-tracer/
可能不像其他人那么花哨或前沿,但我曾经在Flash电影中创建自己的日志函数(有趣的是,称为日志),它调用trace并在页面上调用js函数(使用您喜欢的任何方法) )。 页面上的功能只是一个带有Firebug的简单console.log()。 简单又有效。
Probably not as fancy as the others or cutting edge, but I used to create my own log function in the flash movie (funnily enough, called log) that called trace and also called a js function on the page (using whatever method your comfortable with). The function on the page was just a simple console.log() with Firebug. Simple and worked a treat.
我是一名快乐的 Thunderbolt 用户,也许它也值得一看(多个日志级别,与开箱即用的 firebug 配合得很好)。
I am a happy Thunderbolt user, maybe it is also worth a look (multiple log levels, plays nicely with firebug out of the box).
由于 Macromedia 被 adobe 收购,我认为它应该是 'D:\Documents and Settings\user_name\Application Data\Adobe\Flash Player\Logs\flashlog.txt '。这导致我损失了几分钟。最后我决定尝试查看 D:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs\flashlog.txt 和 bingo,我可以看到 flash trace() 输出。
我想知道为什么 adobe 仍然将日志文件位置保留在 Macromedia 文件夹中。无论它是什么,我都可以看到在浏览器中运行的 Flash 应用程序的跟踪输出,我是一个快乐的人:)
Since macromedia was aquired by adobe,I thought it should be 'D :\Documents and Settings\user_name\Application Data\Adobe\Flash Player\Logs\flashlog.txt '.Which resutlted in loss of few minutes for me.Finally i decide to give it a try to look at D:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs\flashlog.txt and bingo i could see the flash trace() outputs.
I wonder why adobe is sill keeping the log file location in macromedia folder.Whatever it is I can see the trace ouptuts of flash applications run inside a browser and i am a happy man :)
在 Windows 中,如果您使用操作系统的本地化版本(即西班牙语),则必须将“Application Data”替换为本地化版本(即“Datos de programa”)
In windows, If you use a localized version (i.e. spanish) of the operating system, 'Application Data' must be replaced with the localized version (i.e. "Datos de programa")
Unix 的
tail
命令 对我来说效果很好:tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt
-f
开关使日志保持打开状态,并通过 stdout 将其跟踪到打开的终端窗口。 这是一个 Mac 解决方案,我不确定 Windowstail
的等效方案是什么。请注意,路径基于此文档,上面由 @Jarvis 发布。
Unix's
tail
command works well for me:tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt
The
-f
switch keeps the log open and tails it via stdout into an open Terminal window. This is a Mac solution, I'm not sure what the Windowstail
equivalent is.Note that path is based on this document, posted above by @Jarvis.