visual-studio-debugging

“Unable to evaluate the expression” in Visual Studio 2012 Debug Mode

一笑奈何 提交于 2019-12-24 04:53:12
问题 My Visual Studio 2012 installation has unexpectedly started to show the message "Unable to evaluate the expression" everywhere where we watch variables in debug mode. I already tried to change some debug settings, as proposed by some fixes, but the problem stays there. Some others fixes recommend us to re-install visual studio, which I wouldn't like to do. What more can we do to fix it ? 回答1: A reset in all my visual studio settings using "tools -> import and export settings" (which allow you

Conditional breakpoint depends on other breakpoint

五迷三道 提交于 2019-12-24 01:25:51
问题 I need to stop at breakpoint in case when other breakpoint was passed. Is it possible realize in VC++? 回答1: Why did you debug your two breakpoint using this way? If the debugging runs to the specific code line, it would call the conditional, and then trigger the conditional breakpoint, if it just runs to A code line, I don't think it could call the conditional in B code line unless it really calls/runs to this line. 来源: https://stackoverflow.com/questions/39342127/conditional-breakpoint

Visual Studio debug assertion failed dialog unresponsive

℡╲_俬逩灬. 提交于 2019-12-23 17:33:26
问题 When debugging a native win32 application, certain unhandled exceptions (more specifically a failed assertion in Windows atlcomcli.h ) causes the "unhandled exception" dialog (where you can abort , continue (to debug the exception in visual studio) or ignore ) to freeze and be unresponsive - none of the buttons can be pressed. This means I cannot get the callstack among other things, I have to force-terminate Visual Studio and so I cant get any help on debugging where it crashes. It works

“Initialize interactive with Project” is missing for .Net Core Projects in Visual Studio 2019

非 Y 不嫁゛ 提交于 2019-12-23 16:18:15
问题 In VS 2019 the option to initialize projects on the C# Interactive console is missing when targeting .NET Core. The option is also missing in VS 2017 and there is a related question for VS 2017. However the answer to this question mainly confirms that issue but is not offering a solution. Does anyone knows if there is a technical limitation and therefore this feature is simply not feasible for .NET Core? Anyone having a good workaround to still initialize the project (with the complete

Debugging through an extension method

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 12:34:46
问题 I've created a method in C# that extends the string datatype, creating an additional overload to the Split function so that a text qualifier can be defined. Example string data is defined as "field 1","field 2","filed 3" string[] splitData = data.Split(',','"') The extension works fine. I can access the method once I reference and use the namespace. However there is an issue in the method I'm trying to debug, but the debugger won't step into the extension method. Extension Code namespace

Linq Where local counter closure different results in VS watch

烂漫一生 提交于 2019-12-23 12:11:12
问题 I try to delete first 3 elements in array with LinQ Where extension function. Here is an example: var array = new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; var count = 3; var deletedTest1 = 0; var test1 = array.Where(x => ++deletedTest1 > count).ToList(); Console.WriteLine($"{{{String.Join(", ", test1)}}}"); var deletedTest2 = 0; var test2 = array.Where(x => ++deletedTest2 > count).AsEnumerable(); Console.WriteLine($"{{{String.Join(", ", test2)}}}"); var deletedTest3 = 0; var test3 = array.Where(x =>

Visual Studio Code (VSCode) - Error: Debug Adapter Process Has Terminated Unexpectedly

夙愿已清 提交于 2019-12-23 09:27:34
问题 I'm struggling with this error message. Sometimes I cannot run xdebug on Visual Studio Code after upgrading or restarting the editor. Here's a screenshot of the error: Can anyone help me with this? 回答1: After several minutes to find out what happens on my machine, i figure it out how to solve my problem. Because the xdebug is running based on port 9000 and i see on the Debug Console (VSCode) has message listen EADDRINUSE :::9000 , i think there is an another process running on port 9000 so i

can not hit breakpoint inside of .js file

江枫思渺然 提交于 2019-12-23 09:12:04
问题 I upgraded to win 8. Now I run my VS 2012 under admin privileges and I'm creating a website in MVC 4. I checked different solutions online and none have worked. I have a javascript file in my solution but when I put a breakpoint in it, at runtime I see "no symbols have been loaded for this document". I had this issue couple years back with VS 2008 and somehow it resolved. I don't remember if I did change anything at all. Now it's back! except i'm not on win XP and VS 2008. the .pdb files are

Can I get Visual Studio to ignore a specific *instance* of an exception?

元气小坏坏 提交于 2019-12-22 11:25:37
问题 I am working with 3rd-party code that throws and catches a NullReferenceException as part of its ordinary, correct operation. I would like to be able to tell Visual Studio to ignore this instance (ie, ignore NullReferenceException s thrown from this .cs file + line number) but continue to break on other thrown NullReferenceException s. Is this possible? edit: By 3rd party code I mean source code that is part of the project, but that I don't own and won't be modifying. I can't use anything

Debugging with Visual Studio 2012, Windows 8 and User Account Control

陌路散爱 提交于 2019-12-22 06:52:59
问题 First of all - this is all about the RTM Versions. And Windows 8 has some changes regarding the UAC, as we all learned from http://www.brianbondy.com/blog/id/140/, it cannot be disabled side-effect-free. Now the problem starts: Our main app requires elevated privileges (at least the server part). Debugging will only work when running VS in elevated mode, too. But when I'm starting a Silverlight Project in elevated mode of VS, the IE fired up for debugging is started as with normal privileges