10

我想保存方法调用的日志。Traceview 支持该功能,我可以获得 .trace 文件格式。

但是,我需要在没有 DDMS 的情况下打开 .trace 文件格式。

如果没有 DDMS 就无法打开 .trace 文件,如何获取方法调用日志?(最好是 .txt 文件格式。)

谢谢。

4

5 回答 5

9

这是一个旧线程。
因为我在这里找到了,所以其他人可能也需要这个。
尝试这个:

traceview -r yourtrace.trace > 1.txt

看看 1.txt 对你有什么用处。

于 2014-06-23T04:57:14.113 回答
7

"traceview" is a command-line utility. You don't need to launch it from DDMS.

If you just want a text file with times and message names, you can use "dmtracedump -o file.trace".

于 2011-01-14T23:37:39.433 回答
1

一方面,您应该只使用 DDMS,它使用起来非常简单。即使您没有 eclipse,您也可以使用 SDK 附带的那个。但是,如果您已经可以访问,tracefile.trace那么您可以简单地Traceview从 SDK 中使用。只需打开您的命令提示符并导航到您的 androidSDK/tools目录,如下所示:cd C:\Program Files\Android\android-sdk\tools. 一旦出现,只需键入traceview后跟文件名(可以省略 .trace),如下所示:traceview C:\Users\Sino\Desktop\Janky_trace_file. 这应该以 GUI 表示形式打开您的跟踪文件,并具有深入研究您的方法调用的功能。

于 2011-04-05T06:57:38.143 回答
1

这很简单。 Eclipse:文件-->打开文件-->打开traveview文件(xxxx.trace)

于 2014-05-30T22:43:17.357 回答
0

If you have a ".trace" file, just use "traceview " from the command line and you should be able to view the content of the file. You can generate various graphs with the existing .trace file using the command line tool "dmtracedump". http://developer.android.com/tools/help/dmtracedump.html.

于 2014-11-13T23:01:15.277 回答