
homepage: http://facebook.github.io/stetho/
GitHub: https://github.com/facebook/stetho
이 프로젝트는 간단히 말하면 안드로이드 앱을 디버깅을 쉽게 할 수 있게 해주는
프로젝트입니다.
크롬 개발자 툴을 통해서 안드로이드 앱을 디버깅하겠다는 프로젝트인데
신기해서 한번 들여다봤습니다.
밑에 설명이 더 있는데 한번 가볼까요.

크롬 개발자 툴에서 chrome://inspect로 디버깅 할 수 있고
네트워크 측정을 할 수 있습니다.

데이터베이스도 볼 수 있으며, 뷰 계층도 볼 수 있습니다.

dumpapp은 크롬 DevTool과는 다른 컴포넌트 툴인데 앱을 덤프해서
각종 preference를 설정하고 뭔가 할 수 있는 것 같은데 아직은 잘 모르겠으니
설치하고 한번 알아봐야겠습니다.
또, 자바스크립트 콘솔을 통해서
안드로이드 SDK함수까지도 테스트 할 수 있습니다.
한번 설치하고 튜토리얼을 해보죠.
저는 일단 그래들로 설치해서 설정, 실행까지 해보겠습니다.
app의 build.gradle 파일에서
// Gradle dependency on Stetho dependencies { compile 'com.facebook.stetho:stetho:1.3.1' }
이 compile 'com.facebook.stetho:stetho:1.3.1' 코드를 추가해줍니다.
싱크를 하고나서 onCreate 함수에
//Stetho initStetho.initializeWithDefaults(this);이 코드를 삽입해줍니다.
(Application 클래스의 onCreate 함수에 넣어 주셔야 합니다.)
그럼 이제 돌려볼까요. 돌리고 나면 Stetho가 디버깅을 하겠다고
영어로 Alert가 뜨는데 그러고 앱이 동작합니다.
그리고 chrome://inspect 에 들어가봅니다.
그러면 지금 돌리고 있는 앱이 나올겁니다.

(요즘 얼굴인식 프로젝트 중이라
여기서 inspect를 눌러보겠습니다.

오오... 한번 뷰가 어떻게 나오는지 보겠습니다.

원래는 웹페이지라면 옆에 스타일을 탭을 통해서 수정할 수 있지만
여기선 별 의미 없는 자리인 것 같습니다.
콘솔테스트도 한번 해보겠습니다.

안되네요.. ㅎㅎ 추가적으로 설치해야하는게 있는 것 같습니다.
"Not supported without stetho-js-rhino dependency"
그럼 추가해줍니다.
아까 추가했던 곳에
compile 'com.facebook.stetho:stetho-js-rhino:1.3.1'
이 코드를 추가해줍니다.
그리고 다시 실행해보겠습니다.

오오... 다른 것도 이것저것 테스트 할 수 있는 좋은 툴인 것 같습니다.
즐거운 코딩하시길!