visual-studio-debugging

Stack traces with async/await

北城以北 提交于 2019-11-29 23:30:53
It's clear why stack traces are affected with Microsoft's new programming paradigm. We now have a semantic stack and a couple of physical ones (my choice of words). What I get to see is an exception's StackTrace property (and in the debugger) is the physical ones, concatenated: private async Task CheckFooAndBar() { var log = LogManager.GetLogger("Test"); log.Info("CheckFooAndBar"); try { await Foo(); } catch (Exception ex) { log.Info("StackTrace of last exception: " + ex.StackTrace); } Console.ReadKey(); } private async Task Foo() { await Task.Factory.StartNew(() => Thread.Sleep(1000)); await

Visual Studio breakpoints not being hit

雨燕双飞 提交于 2019-11-29 22:49:26
I'm working with an ASP.NET MVC project that seems to be having some issues when attaching to the IIS process (w3wp.exe). I'm running the solution and IIS 8.5 on my own local machine so I wouldn't think that this has anything to do with our network. What's strange to me is that I'm able to hit the breakpoints on any other solution I debug locally. The issue I'm having exactly is that the breakpoints turn to red, hollow circles and never get hit. Usually the fix for this is a Clean/Rebuild of the solution but this hasn't worked. I've confirmed the code is being updated by adding "throw new

'Step Into' is suddenly not working in Visual Studio

冷暖自知 提交于 2019-11-29 22:10:05
All of a sudden, I have run into an issue where I cannot step into any code through debugging in Visual Studio. The step over works fine, but it refuses to step into ( F11 ) any of my code. This was working before, now all of a sudden it does not. I've tried some things below, but I still had no success: Delete all bin files in every project in my solution, clean solution, re-build solution. Build projects in solution indivdualy Restart machine It an ASP.NET C# application consuming a WCF sevice locally. It is in debug mode. I have a breakpoint set on the page consuming the service. The

Debugging exceptions in a Async/Await (Call Stack)

偶尔善良 提交于 2019-11-29 20:51:50
I use the Async/Await to free my UI-Thread and accomplish multithreading. Now I have a problem when I hit a exception. The Call Stack of my Async parts allways starts with ThreadPoolWorkQue.Dipatch() , which doesn't help me very much. I found a MSDN-Article Andrew Stasyuk. Async Causality Chain Tracking about it but as I understand it, its not a ready to use solution. What is the best/easiest way to debug if you use multithreading with Async/Await? The article you found does a good job of explaining why call stacks don't work the way most of us think they do. Technically, the call stack only

Cannot debug application in release mode even with DebugType=full

こ雲淡風輕ζ 提交于 2019-11-29 17:51:54
问题 We are building a solution for Release, but when attempting to attach using studio 2010 professional, no thread is showing any stack information, nor any breakpoint can be set, etc. The goal is to be able to attach the Visual Studio/JIT Debugger to the running process while having as many optimization benefits as possible. Most of our searches comes down to 'compile with debug:full' and you will be able to debug, but that doesn't seem to be the case, I thing that the JIT optimizes the code in

How to debug an Asp.Net Mvc Application in Visual Studio 2012 from a remote computer

烈酒焚心 提交于 2019-11-29 14:54:53
问题 I have two computers connected and I have made Remote Desktop Connection from Computer A to Computer B . I opened Visual Studio 2012 in Computer B , and started debugging Asp.Net MVC Application , it works correctly in browser of local machine and it is also hosted on IIS . But when I open that MVC Application from Computer A's browser , than debuging does not work , i.e. no breakpoints are hit. I have searched about it , and came across Remote Debugging Monitor , but I am not able to use it.

How can I detect if “Press any key to continue . . .” will be displayed?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 13:21:40
When running a console application in Visual Studio, depending on your settings, it will add a prompt after the program exits: Press any key to continue . . . I have found how to detect if I am running under the debugger(use Debugger.IsAttached ), but it isn't helpful. Press CTRL-F5 to Start Without Debugging sets this flag to false , yet still shows the prompt . I want to detect this because I'd like to display my own message and wait for a keypress, but not double up keypress checks . I don't want to muck with my general Visual Studio settings. If I can disable it for this project in a way

Visual Studio during Debugging: The function evaluation requires all threads to run

大城市里の小女人 提交于 2019-11-29 13:06:52
I'm getting suddenly a strange error while debugging. Up to now the variable in the watch windows has been shown correctly. Now I am getting always the error message in the watch windows: The function evaluation requires all threads to run I am not able to check any variable anymore. I am not explicit working with threads. What can I do to get it working again? I disabled already as mentioned in some forums the function: "Enable property Evaluation and other implicit function Calls" in the option window of the debugger. But without success, then I am getting the error: Error Implicit Function

How to debug Visual Studio 2012 instance design-time

女生的网名这么多〃 提交于 2019-11-29 12:35:01
问题 I'm developing a WPF MarkupExtension and encountered errors during design time. With the previous version of Visual Studio 2010 it was possible to start a second instance of Visual Studio 2010 and attach to the process of the already-running instance, setting breakpoints and debugging the design time behavior. In Visual Studio 2012 however I can attach to the process of another Visual Studio 2012 as well, but no symbols are loaded in the second instance and therefor I'm not able to debug the

Why is the dictionary debug visualizer less useful in Visual Studio 2010 for Silverlight debugging?

心已入冬 提交于 2019-11-29 09:50:34
I was debugging in Visual Studio 2010, which we just installed and trying to look at a dictionary in the quick watch window. I see Keys and Values, but drilling into those shows the Count and Non-Public members, Non-Public members continues the trail and I never see the values in the dictionary. I can run test.Take(10) and see the values, but why should I have to do that. I don't have VS 2008 installed anymore to compare, but it seems that I could debug a dictionary much easier. Why is it this way now? Is it just a setting I set somehow on my machine? Test code: Dictionary<string, string> test