Conditional Breakpoints in background threads  
Author Message
DrHerbie





PostPosted: Visual C# IDE, Conditional Breakpoints in background threads Top

VS2005 does not seem to be hitting my conditional breakpoint (set for when property equals a specific value) when running as a background thread (spawned from background worker on a form).

Is this a problem with VS2005, or is there something I'm missing

Herbie



Visual C#8  
 
 
TaylorMichaelL





PostPosted: Visual C# IDE, Conditional Breakpoints in background threads Top

It should work just fine. When setting a breakpoint in the de**** it actually inserts an INT 3 (I believe) into the code stream (for managed code it probably inserts something else). Nevertheless when the instruction is hit it'll notify the de**** which allows you to break into the code. It'll work on any thread created by the process.

Conditional breakpoints can be hard to get right though. For example if you do this: nIdx = 900 then it'll continually set nIdx to 900. Verify your conditional breakpoint is set properly.

Michael Taylor - 12/7/06


 
 
DrHerbie





PostPosted: Visual C# IDE, Conditional Breakpoints in background threads Top

Hmmm, you could be right.

I tried it several times yesterday and it didn't work once, but when I tried it first thing this morning it worked first time. I guess I could have mis-typed the == operator several times over. Honestly, over a decade of programming experience and I still make beginners mistakes!

Thanks

Herbie