WTP debugging and socket setup