Visual Studio 2005 problem with debugging threads

I have two major problems debugging threads in Videual studio 2005 2.0.

I want to go step by step inside a thread.

i wrote this simple code :

inMsgsThread = new Thread(new ThreadStart(inMsgsLoop));

inMsgsThread.Start();

void inMsgsLoop()

{

string Str="";

int i=0;

i=6; // Breakpoint

i=7;

i=-8;

}

1. When the program activates the thread and gets to the breakpoint, the whole studio gets stuck for 8 seconds

2. After the studio recovers from the 8 second stuck.

When i push F10 ,to go step by step inside the thread, the compiler jumps out of the thread and continue the running of the program. I think that the thread is totaly terminated because i pushed F10. because when i put a while(true) loop inside the thread and put another breakpoint inside the loop the compiler doesn't stop there,which means the thread function doesn't work anymore and the whole thread is terminated just because i pushed F10 inside the thread.

what is wrong with the VS



Answer this question

Visual Studio 2005 problem with debugging threads

  • Evan Mulawski

    I just tried that, and it works fine... There must be something funny going on.

    Silly question, but you're definitely debugging the debug build

  • Visual Studio 2005 problem with debugging threads