调试与logcat的 [英] debugging with logcat

查看:159
本文介绍了调试与logcat的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在其习惯了logcat中(在Mac),这是很确定。

Once having gotten used to logcat (on MAC) it is quite OK.

但是有两个问题,我想知道是否有改善他们的一种方式。

However there are two issues I would like to know if there is a way to improve them.

一)有多少行存储在logcat的?有没有增加这个办法?有时我想记录几千行,但线条得到由某种逻辑,我还需要了解删除。

a) how many lines are stored in logcat? is there a way to increase this? sometimes I would like to log several thousand lines, but lines get deleted by some kind of logic which I yet need to understand.

B)搜索logcat的正常键入搜索线搜索文本,但它比搜索的过滤器。如果我现在要开始寻找在随后的行允许用户从找到的文字中第一次出现说,缺一不可,因为光标或线路,即会作为过滤器被删除丢失。

b) searching is logcat is OK typing the search text in the search line, however it's more of a filter than a search. If I now want to start looking at the subsequent line lets say from the first occurance of the found text, one can't, since the cursor or line gets lost as soon as the filter is removed.

现在只有这样,才能真正去行是手动看看时间戳记并重新完整的日志内容搜索,过滤器以前显示的行 - 不忘preSS的暂停BTN使滚动回没有得到一些系统信息打断

The only way now to actually go to the line is to look at the time stamp and revisit the complete log content manually searching for the line that the filter has shown before - not forgetting to press the "pause" btn so that scrolling back does not get interrupted by some system messages

我希望我可以解释这不够好,是可以理解的: - )

I hope I could explain this well enough to be understandable :-)

推荐答案

据我的理解,你说的是在Eclipse的logcat窗口。

As far as i understood, you talking about logcat window in Eclipse.


    preferences-> Android-> LogCat-> logcat的消息的最大数量来缓冲您可以通过;修改窗口 - &GT增加线数在该窗口$ C>值。
  1. 您可以打开终端窗口,重定向文件logcat的:

  1. You can increase count of lines in this window by modifing Window->Preferences->Android->LogCat->Maximum number of logcat messages to buffer value.
  2. You can open Terminal window and redirect logcat in file:

亚行logcat> $ HOME / logcat.xt

adb logcat > $HOME/logcat.xt

比你可以查看另一个终端窗口这个文件,搜索这个文件用你最喜欢的文本编辑器,使用grep等进行过滤。

than you can view this file in another Terminal window, search this file with your favorite text editor, filter it with grep etc.

这篇关于调试与logcat的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆