Click to See Complete Forum and Search --> : How to debug running Multilthread processes


sleong
February 7th, 2012, 06:00 PM
I am taking over one project from previous engineer. The project is using multithread and each thread is excuting a window process. How do I debug the process that is running in the background? I tried to us windbg -p <pid> /g. It does not work for me. It prompt invalid process id. I think because the processes are running and quick. The code is written .NET C#. I don't know what failed in the middle of the process. If you know the way to debug, can you let me know.

Thanks

MrViggy
February 8th, 2012, 09:41 AM
Basically, the same way you'd debug a single threaded process. Somehow, attach a debugger to the process and "break". If the process is running too quickly, you could always add some kind of debug logging (something that logs messages to a console, or file on disk).

Viggy