cocos2d-js 寫日誌log 查看日誌log Android調試查看log

來源:互聯網
上載者:User

標籤:android   style   blog   http   使用   os   for   2014   

1 輸出日誌的方式,當然是cc.log了 2 如何查看日誌?

       a)如果小程式可以先在瀏覽器上跑,例如用chrome,在控制台就可以看到輸出的log;

       b)如果在真機上調試,就需要用log工具了。Android上使用logcat。

 

3 Android調試使用logcat的辦法

logcat位置:Android SDK目錄中 D:\AndroidDevelopTools\sdk\platform-tools

查看步驟:

    • 串連手機
    • cmd方式開啟logcat:adb.exe logcat
    • 這就可以看到cocos程式的日誌了,但除了cocos的日誌,還有各種系統程式的日誌。

 

logcat的具體命令列參數,可以看網上說明,也可以看logcat自己的help

我個人比較笨拙,死活沒找到filter的正確用法。於是,我就懶得折騰了,改為使用cmd的過濾器。| find "cocos2d-x debug info"

最終啟用logcat的命令:

adb.exe logcat | find "cocos2d-x debug info"

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.