breakpointing a separate thread?
Code:
void Main()
{
Thread t = new Thread(Test);
t.Start();
}
void Test()
{
int i = 0;
i++;
i++;
}
If I put a breakpoint inside of "Test", when it breaks it freezes VS2005 for 5-10 seconds and then when I try stepping over it just resumes the thread.
Does anyone else have this problem? I also tried VS2008.
Re: breakpointing a separate thread?
Just did a quick test in VS 2008 and it worked fine for me.
Code:
using System.Threading;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
Thread t = new Thread(Test);
t.Start();
}
static void Test()
{
int i = 0;
i++;
i++;
}
}
}
I put a breakpoint on the red line.