Skip to Content
Android Developer Tools深入精要
book

Android Developer Tools深入精要

by Mike Wolfson
July 2014
Intermediate to advanced
248 pages
5h 19m
Chinese
GoTop Information, Inc.
Content preview from Android Developer Tools深入精要
偵錯(
Debugging
|
93
[Page-98]
過濾
logcat
我利用完整的日誌檢視畫面來查看大概的流程,但我時常需要更細部的檢視,要做到
這點,我用自訂的標籤來查看特定分類;因為這只顯示我想查看的資訊,這可以更容
易理解我感興趣的流程。
例如,若只想看到與使用者互動有關的資訊,我可以利用
UI
標籤來過濾;在這個例子
中,在
UI
標籤旁有個
*
號(表示我想看到所有訊息),而
*:s
則代表我想關閉所有其
他訊息:
$ adb logcat UI:* *:s
D/UI ( 897): The user has pressed the button
D/UI ( 897): The user entered a value: value from the call is: 24324
D/UI ( 897): Setting value on screen to: Euro 183.95
另一個我想追蹤的是與
web
呼叫和解析回應的程式邏輯,我使用
NETWORK
JSON
的分類組合達成:
$ adb logcat JSON:* NETWORK:* *:s
D/NETWORK ( 897): URL to send: http://rate-exchange.appspot.com/currency?
from=USD&to=EUR&q=243.24-->
D/NETWORK ( 897): Response received
D/NETWORK ( 897): The return ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Android 高效能多執行緒

Android 高效能多執行緒

Anders Goransson
深入淺出 jQuery

深入淺出 jQuery

Ryan Benedetti, Ronan Cranley
HTML5 錦囊妙計

HTML5 錦囊妙計

Christopher Schmitt, Kyle Simpson

Publisher Resources

ISBN: 9789863470861