You must debug them as any other C++ app - but some tips.
A good approach is often to run and debug all threads at first in one thread (as function call) to find the problems and then "outsource" the stabil function in a thread. A detached thread should exit execution. Make some output at the exit point.
You can write to system logs and include the thraed id or to a own log file, but a different for every thread. Name them after the thread id. Set breakpoint before you start debugging.
The biggest problem is often the syncronization between threads, so the carefully access common data or files. The article
Thread Synchronization for Beginners gives a good overview about different technologies. Understand and learn these professional technologies: they make multithreading safe. Use some static global data for common thread data.
My everyday experience is
NEVER EVER to allocate and deallocate byte in different threads: Memory stays in the thread. Copy it when needed!!!