menu
Is this helpful?

# 디버깅

SDK를 구현하는 도중 TE의 Debug 기능을 사용하여 디버깅할 수 있습니다.

ThinkingData::set_enable_log(true)

# 1. Debug 기능

TE의 Debug 기능을 이용하여 디버깅을 수행할 수 있습니다.

다음은 DebugConsumer의 코드 예시입니다:

consumer = ThinkingData::TDDebugConsumer.new('SERVER_URL', 'APPID', device_id: "123456789")
te = ThinkingData::TDAnalytics.new(consumer)

DEMO_ACCOUNT_ID = '123'
DEMO_DISTINCT_ID = 'aaa'

properties = {
  array: ["str1", "11", Time.now, "2020-02-11 17:02:52.415"],
  prop_date: Time.now,
  prop_double: 134.1,
  prop_string: 'hello world',
  prop_bool: true,
}

ta.track(event_name: 'test_event', distinct_id: DEMO_DISTINCT_ID, account_id: DEMO_ACCOUNT_ID, properties: properties)

Debug 모드는 데이터 수집의 질과 앱의 안정성에 영향을 미치므로, 데이터 검증만을 위해 사용해 주세요.