|
-
Jan 20th, 2003, 02:58 AM
#1
Thread Starter
Addicted Member
How to debug multiple threads?
I'm using (not by choice) Microsoft's Visual Studio .NET to do my development. I've written an application that uses Microsoft's recommend method for Async Serial I/O (overlapped).
The problem is, In my main UI thread, I'm doing a bit of serial code (sending, receiving, etc). All is good, until for some reason, my Sending thread seems to hang, crash, or something. I've tried placing all kinds of TRACE() statements to help, but i haven't been able to track it down within the send thread.
I am able to break on when the error occurs from within my main UI thread, but I have no idea how I can switch to the Tx thread to see where it's stuck at.
Is this possible? I would hope so...
Thanks
Phil
-
Jan 20th, 2003, 04:29 AM
#2
PowerPoster
I'll use this free debuging tools from Microsoft, this tool is mainly for Device Driver development, but it also can use to debug normal application. Basically, this is a debugging tool you most have 1 in your desktop
-
Jan 20th, 2003, 04:52 AM
#3
I never found out how to debug multiple threads. That's the largest problem of multithreaded programming.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 20th, 2003, 05:27 AM
#4
Lively Member
-
Jan 20th, 2003, 12:45 PM
#5
Thread Starter
Addicted Member
rekcus:
Multi-threaded Debug DLL (/MDd)
Chris: I'll take a look at that...I can't believe Microsoft didn't include a 'switch to thread' ability into VStudio...crazy!
Phil
-
Jan 20th, 2003, 12:50 PM
#6
Monday Morning Lunatic
Stick a breakpoint somewhere in the send thread, and hope
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jan 20th, 2003, 12:58 PM
#7
Thread Starter
Addicted Member
parksie, yah, that was my original attempt. Never breaks unless I start sticking breakpoints in legit working code and that is a pain and never allows me to see the bug.
Ugh!
-
Jan 20th, 2003, 01:18 PM
#8
Frenzied Member
According to MSDN, you can use the Threads Window (Debug->Threads) to switch between threads for debugging purposes.
Z.
-
Jan 20th, 2003, 01:51 PM
#9
Thread Starter
Addicted Member
Originally posted by Zaei
According to MSDN, you can use the Threads Window (Debug->Threads) to switch between threads for debugging purposes.
Z.
Bingo...perfect!
Thanks
Phil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|