redcodefinal
redcodefinal

Reputation: 909

Debugging in VS2010 causes performance lag

VS2010 Performance Issues

I've been having a problem with Visual Studio creating lag whilst debugging. The problem occurs during a game I've written where, when you shoot it creates about a second of lag. Weirder still, I wrote this same program before and the lag didn't exist, very few things have changed in my new program.

The ultimate weirdness is that when I do a performance profile, it suddenly works awesome. Ditto if you go into the solution directory and launch either the debug or release version directly. Anyone know why this is happening? I can't work on my game until it's resolved. :(

Computer Specs:

OS: Windows 7 Home Premium 64-bit

CPU: Intel Core i5 3570K

RAM: 8.00 GB Dual-Channel DDR3 @ 665MHz (9-9-9-24)

MoBo: ASRock H61M-HVS

Visual Studio:

Version: Ultimate SP1

Extensions: Resharper, .Net Demon, VS10X Code Map, FxCopRunner, Indent Guides, Power Commands, Productivity Power Tools.

EDIT: The issue was occuring around a bit of code I use to parse XML files. The issue was that I overused try-catch and it caused considerable lag.

Upvotes: 1

Views: 221

Answers (1)

leppie
leppie

Reputation: 117310

If your code throws many exceptions which are caught, VS2010+ (.NET 4) will be very slow with debugging compared to VS2008 (.NET 3.5). This is known issue.

This is more likely to happen when debugging unit tests that are heavy on exception testing.

Upvotes: 1

Related Questions