tcpdump is an excellent tool for debugging network issues. Even though the name says TCP, it works just as well for capturing DNS requests which happen over UDP.