Android/App개발2010. 2. 23. 21:50

SDK로 App개발시에는 eclipse의 debug기능을 사용할수도 있으나 플랫폼 개발시에는 이런 방법이 안통한다.

이떄 아래 코드처럼 일부러 exception을 발생시킨다음. try catch문을 이용해서 call stack을 찍어주면 해당 함수가 호출될때마다 Logcat에 호출경로를 찍어줍니다.


    @Override
    public void setVolumeControlStream(int streamType) {

        Log.d(TAG, "setVolumeControlStream -> " + streamType);        

        mVolumeControlStreamType = streamType;
      try {
         int c=1; c = c/0;

     } catch(Exception e) {

         e.printStackTrace();    

     }    

    }


Posted by 삼스