2017-05-22 1 views
0

외부 라이브러리 (AppCompat android)에 변수 값을 기록하고 싶습니다.java에서 라이브러리 변수를 로깅하는 방법은 무엇입니까?

어떻게 든 가능합니까? 내가 중단 점을 명중하고 값을 확인할 수 있습니다 알고 있지만, 나는 이런 식으로 예를 들어

와 디버깅하기가 매우 어려운 많은 터치 이벤트 콜백을 확인하려면, 코드는 다음과 같습니다

int setHeaderTopBottomOffset(CoordinatorLayout parent, V header, int newOffset, 
    int minOffset, int maxOffset) { 
    final int curOffset = getTopAndBottomOffset(); 
    int consumed = 0; 

    if (minOffset != 0 && curOffset >= minOffset && curOffset <= maxOffset) { 
      // If we have some scrolling range, and we're currently within the min and max 
      // offsets, calculate a new offset 
      newOffset = MathUtils.constrain(newOffset, minOffset, maxOffset); 

      if (curOffset != newOffset) { 
       setTopAndBottomOffset(newOffset); 
       // Update how much dy we have consumed 
       consumed = curOffset - newOffset; 
      } 
     } 

     return consumed; 
} 

그리고 때 curOffset != newOffset을 사례를 기록하고 curOffsetnewOffset을 로그 아웃 할

당신은 당신이, 다음, 중단 점을 마우스 오른쪽 버튼으로 클릭 Suspend 옵션을 해제하고 함께 Evaluate and log를 입력 관심있는 줄에 중단 점을 설정하여 IDEA에서이 작업을 수행 할 수 있습니다
+2

구체적인 내용을 기입하십시오. –

답변

0

뭔가 같은 Log.d(TAG, debugMessage)

관련 문제