# Debugging and Logging
During the process of SDK Integration, you can perform real-time debugging by checking SDK logs in the IDE console or using the Debug function of TE.
# Logging
TDLog::enable = true;
# Debugging
You need to follow the following two steps to enable the Debug mode:
# Use DebugConsumer
The sample code for enabling the Debug mode on the client side is as follows:
string deviceId = "123456789";
TDDebugConsumer debugConsumer("appId", "serverUrl", "", deviceId);
TDAnalytics te(debugConsumer);
TDPropertiesNode event_properties;
event_properties.SetString("name", "value");
te.track("accountId", "distinctId", "eventName", event_properties);
It can only be used for data verification at the integration stage, and should not be used in the online environment.