How can i open .trace file format(traceview) witho

2020-05-27 04:00发布

I want to save a log of method calls. Traceview supports that function and I can get .trace file format.

but, I need to open .trace file format without DDMS.

If I can't open .trace file without DDMS, How can I get a log of method calls? (The best is .txt file format.)

thanks.

5条回答
孤傲高冷的网名
2楼-- · 2020-05-27 04:36

This is simple. Eclipse: File --> Open file --> open traveview file (xxxx.trace)

查看更多
甜甜的少女心
3楼-- · 2020-05-27 04:40

"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".

查看更多
家丑人穷心不美
4楼-- · 2020-05-27 04:51

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.

查看更多
仙女界的扛把子
5楼-- · 2020-05-27 04:52

It is an old thread.
because I found here, so other guys may need this, too.
Try this:

traceview -r yourtrace.trace > 1.txt

and look 1.txt has any useful thing to u.

查看更多
祖国的老花朵
6楼-- · 2020-05-27 04:54

Well for one, you should just use DDMS it's very simple to work with. Even if you don't have eclipse you can use the one that shipped with the SDK. However, if you already have access to the tracefile.trace then you could simply use Traceview from the SDK. Simply open your command prompt and navigate to your android SDK/tools directory as such: cd C:\Program Files\Android\android-sdk\tools. Once there simply type traceview followed by the filename (can omit .trace) as such: traceview C:\Users\Sino\Desktop\Janky_trace_file. This should open your trace file in a GUI representation with functionality to delve into your method calls.

查看更多
登录 后发表回答