안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
안드로이드 OS에 포함된 기본 어플리케이션을 디버깅 할 수 있는 방법이 있는지요?
Package의 APP를 따로 복사해서 안드로드 Project로 만들면
지원하지 않은 API (OS 단에서만 사용가능하고 SDK에서 사용못하는) 가 있어서
제대로 디버깅을 할 수가 없답니다.
OS단의 APP를 이클립스에서 디버깅이 가능 한지요?
OS 소스를 가져다가 이클립스로 불러 들이면,
http://www.androidpub.com/34647
위 글처럼 Java Project로 나오고,
Package의 APP는 이 프로젝트의 하위 디렉토리중 하나로 나옵니다.
OS 개발한 구글쪽에서 어떻게든 디버깅을 할텐데요.
혹시 이 방법 아시는 분 계신지요?
감사합니다.
2009.11.24 15:34:02
위 내용에서
if you select one and break it (by clicking the "pause" icon), it should show the stack trace, source file, and line where execution is at. Breakpoints and whatnot should all work.
이렇게 쓰여 있는데요.
Debug 퍼스팩티브에 Thread 몇개 나오지만 ,
실제 pause 해 봐야 NativeStart.java 란 곳에서 가서 Suspended 되네요.
이것으로 어떻게 소스 와 연관 지어서 디버깅이 가능 하다는 것인지 모르겠습니다.
테스트는 해보지 않았지만 http://source.android.com/using-eclipse 에 보면 디버깅 하는 방법이 나와있네요.
Debugging the emulator with Eclipse
You can also use eclipse to debug the emulator and step through code. First, start the emulator running:
In another shell, start DDMS (the Dalvik debug manager):
Now, in eclipse, you can attach to the emulator:
Note that port 8700 is attached to whatever process is currently selected in the DDMS console, so you need to sure that DDMS has selected the process you want to debug.
You may need to open the Debug perspective (next to the "Java" perspective icon in the upper-right, click the small "Open Perspective" icon and select "Debug"). Once you do, you should see a list of threads; if you select one and break it (by clicking the "pause" icon), it should show the stack trace, source file, and line where execution is at. Breakpoints and whatnot should all work.