added PDEBUG macro option within capture thread