简体   繁体   中英

Visual Studio F5 debugging is slower than Attach to Process

If i start my application with F5 (debugging) it takes for a certain operation about 2000ms. If i start the application with F5 + CTRL (without debugging) and attach Visual Studio with "Attach to Process" it takes only ~100ms.

Has someone a idea what component can cause this performance 'problem'?

C# application / VS 2012.

Edit

Code-Snipped:

Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
changed.Validate(context);
stopwatch.Stop();
Console.WriteLine(stopwatch.ElapsedMilliseconds);

One major thing that makes lot of difference is during F5 or debugging visual studio loads all the pdb files.pdb files are the program database files and are the reason why you are able to debug.If you compile in build mode you will see the bin folder having .pdb file corresponding to every dll.

More on pdb files : http://msdn.microsoft.com/en-us/library/yd4f8bd1(vs.71).aspx

one article on this topic http://blogs.msdn.com/b/zainnab/archive/2010/11/01/start-debugging-vs-start-without-debugging-vstipdebug0037.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM