views:

63

answers:

1

My development machine is a quad core system, but I just ran into ( and I am still debugging ), and problem when my application is deployed to single processor systems. I get a dead lock.

I would like to be able to debug using only a single processor, rather than having to build a development VM to debug with.

Is it possible to tell Visual Studio to only use a single processor when running a debug session, or are there any tools out there that can help find deadlocks.

Generally, I want to test single and multiple core scenarios on the same machine, and I am looking for tips, tricks, and tools.

I should mention I am using .NET 3.5 SP1

+3  A: 

Changing the CPU affinity of the process should work. There's a WinAPI function for that purpose, SetProcessAffinityMask, and for a one-off thing, you can also use Task Manager to change the affinity of a given process.

Michael Madsen
For managed code check out http://msdn.microsoft.com/en-us/library/system.diagnostics.process.processoraffinity.aspx rather than the WinAPI call.
Russ