在浏览器中运行时查看Flash的trace()

发布于 2024-07-19 04:34:02 字数 67 浏览 6 评论 0原文

在任何浏览器中运行时查看 Flash/Flex 电影的 trace() 输出的简单方法是什么?

What's an easy way to see the trace() output of Flash/Flex movies when running in any browser?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

始终不够爱げ你 2024-07-26 04:34:02

下载并安装 Flash Player 的内容调试器版本

通过添加 mm.cfg 文件来启用跟踪日志记录(官方指南

ErrorReportingEnable=1

    TraceOutputFileEnable=1

:保存 mm.cfg 取决于操作系统:

  • Mac OS X:/Library/Application Support/Macromedia
  • Windows:%HOMEDRIVE%\%HOMEPATH%
  • Linux:/ home/用户名

日志文件 flashlog.txt 可在以下位置找到:

  • Windows 95/98/ME/2000/XP:C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs
  • Windows Vista:C:\Users\用户名\AppData\Roaming\Macromedia\Flash Player\Logs
  • Mac OS X:/Users/用户名/Library/Preferences/ Macromedia/Flash Player/Logs/
  • Linux:/home/username/.macromedia/Flash_Player/Logs/

或者,您可以安装 Firefox 插件 FBTracerFirebug 面板。

Download and install the content debugger version of Flash Player.

Enable trace logging (official guide) by adding an mm.cfg file:

ErrorReportingEnable=1

    TraceOutputFileEnable=1

Where to save mm.cfg depends on the OS:

  • Mac OS X: /Library/Application Support/Macromedia
  • Windows: %HOMEDRIVE%\%HOMEPATH%
  • Linux: /home/user name

The log file, flashlog.txt, can be found at:

  • Windows 95/98/ME/2000/XP: C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs
  • Windows Vista: C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs
  • Mac OS X: /Users/username/Library/Preferences/Macromedia/Flash Player/Logs/
  • Linux: /home/username/.macromedia/Flash_Player/Logs/

Optionally, you can install the Firefox add-on FBTracer which displays the trace output in a Firebug panel.

茶花眉 2024-07-26 04:34:02

我只是使用 console.log 函数(大多数最新的浏览器都实现了它);

import flash.external.ExternalInterface;

public static function log(msg:String, caller:Object = null):void{
        var str:String = "";
        if(caller){
            str = getQualifiedClassName(caller);
            str += ":: ";
        }
        str += msg;
        trace(str);
        if(ExternalInterface.available){
            ExternalInterface.call("console.log", str);
        }
    }

i just use the console.log function (most recent browsers implement it);

import flash.external.ExternalInterface;

public static function log(msg:String, caller:Object = null):void{
        var str:String = "";
        if(caller){
            str = getQualifiedClassName(caller);
            str += ":: ";
        }
        str += msg;
        trace(str);
        if(ExternalInterface.available){
            ExternalInterface.call("console.log", str);
        }
    }
聆听风音 2024-07-26 04:34:02

查看 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”的别名这将有效地为我提供一个用于“浏览器内”跟踪的日志记录窗口:

alias flashlog='tail -f /PATH/TO/flashlog.txt'

或者如果您有日志查看器(如 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:

alias flashlog='tail -f /PATH/TO/flashlog.txt'

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" ;)

时光礼记 2024-07-26 04:34:02

如果您想要一个基本的日志文件查看器,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/

电影里的梦 2024-07-26 04:34:02

可能不像其他人那么花哨或前沿,但我曾经在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.

寂寞清仓 2024-07-26 04:34:02

我是一名快乐的 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).

抠脚大汉 2024-07-26 04:34:02

由于 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 :)

禾厶谷欠 2024-07-26 04:34:02

在 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")

々眼睛长脚气 2024-07-26 04:34:02

Unix 的 tail 命令 对我来说效果很好:

tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt

-f 开关使日志保持打开状态,并通过 stdout 将其跟踪到打开的终端窗口。 这是一个 Mac 解决方案,我不确定 Windows tail 的等效方案是什么。

请注意,路径基于此文档,上面由 @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 Windows tail equivalent is.

Note that path is based on this document, posted above by @Jarvis.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文