问题
I'm making an application with the Android XMPP library aSmack with Eclipse. I can not get debug is launched in a separate window as instructed smack documentation:
http://www.igniterealtime.org/builds/smack/docs/latest/documentation/debugging.html
I imported smackx-debug.jar inside the libs folder and I've added this line to the code:
Connection.DEBUG_ENABLED = false;
The debug occurs, but in console of logcat, not a Enhanced Debugger.
回答1:
aSmack is not able to use the enhanced debugger of smack. It's not possible that the Android app draws a new window on your PC running eclipse.
Instead all XMPP traffic is logged to the Android log and can be viewed with DDMS or adb shell logcat
.
回答2:
I am using smack 4.3.0 Enable debugging in the logcat with
XMPPTCPConnectionConfiguration conf = XMPPTCPConnectionConfiguration.builder()
.setXmppDomain(mServiceName)
.setHost(mServiceName)
.setResource("Rooster+")
.setSendPresence(true)
.enableDefaultDebugger()
.enableDefaultDebugger(), this sorted me out
来源:https://stackoverflow.com/questions/12263064/debug-xmpp-android-client-with-asmack-eclipse-and-the-enhanced-debugger