visual-studio-debugging

Visual Studio 2013 debugger showing weird values for std::string

泄露秘密 提交于 2019-12-13 16:12:29
问题 I have a large cmake generated solution with many projects in it. For some reason I cannot view the contents of a string because according to the debugger _Bx._Buf contains some garbage. text.c_str() returns correctly "Hello" . The problem does not only occur for local strings. Functions that return std::string also appear to be garbage in debugger whereas in reality they are OK. For clarity: the screenshot was made after the assignment line was executed. So it is not that text is

Restrict Visual Studio 2010 from debugging third-party DLL files

吃可爱长大的小学妹 提交于 2019-12-13 14:46:13
问题 Some days back, I had enabled third-party debugging for the Ninject DLL to test some things. Now I am unable to detach the debugger from the Ninject source files and because of that the code is stepping (trying to step if it could not find the source file) into the Ninject source. The same problem is happening for Telerik source code too. I have checked "Enable Just My Code (Managed Only)" in the debugging options, but the Visual Studio still steps into third-party code. How do I debug just

Visual Studio 2015 debugger showing null when object is not null

随声附和 提交于 2019-12-13 14:07:31
问题 If I run the following (admittedly contrived) program (VS2015, .NET4.6): class Program { static void Main(string[] args) { TestTaskAsync(null).Wait(); TestTask(null); } public static async Task TestTaskAsync( EqualityComparer<int> comparer) { comparer = EqualityComparer<int>.Default; if (comparer == null) { Console.WriteLine("comparer is null"); } Func<int, bool> func = i => comparer.Equals(i, 0); } public static Task TestTask( EqualityComparer<int> comparer) { comparer = EqualityComparer<int

Execute method from immediate window

别说谁变了你拦得住时间么 提交于 2019-12-13 13:24:53
问题 It is possible to execute static method from immediate window in Visual Studio when the app is not running. Given namespace Handyman { public class Program { static void Main(string[] args) { } static string SayHello(string name) { return string.Format("Hello {0}!", name); } } } SayHello static method can be executed from immediate window using ?SayHello("Miki Kola") syntax and would return the message to the immediate window. I'm wondering if it's possible to execute method on object using

XAML is not updating when debugging on a WP8 device

你。 提交于 2019-12-13 12:06:50
问题 I am experiencing a problem when deploying to a Windows Phone 8 device. It seems the XAML is not updating when I do a build and debug. The only way it seems to update is when I do a Rebuild > Debug or uninstall the app then debug. Here is a scenario: A page contains a button with a click event named "Button_Click". I debug and everything works. Stop debugging. Now change the event handler's name to NewButton_Click (yes, in both xaml and cs). Start debugging again, click the button and you get

How can if() evaluate incorrectly in C# [closed]

别等时光非礼了梦想. 提交于 2019-12-13 10:12:20
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 8 years ago . I have a simple bit of logic. int i = 0; if (i < 0) { //whatever; } When I debug with VS I see i set to 0 BUT the if evaluates as false! How can this be?

Application life cycle on a physical device without Lifecycle Events

天涯浪子 提交于 2019-12-13 04:33:05
问题 Is there a solution that will allow me to run and test the application life cycle on a physical device? Without the use of "Lifecycle Events" built-in Visual Studio 2015? I wanted to be able to call the appropriate methods of life cycle as Suspend and Resume after pressing the physical buttons on the device (arrow return, windows icon, etc.) and if possible get a message about calling this method something like: private async void Application_Suspending(object sender, SuspendingEventArgs e) {

VS2017: Which function causing breakpoint timeout?

笑着哭i 提交于 2019-12-13 03:44:16
问题 I'm getting the below error when I hit some breakpoints. The error makes sense but it's not telling me which function is being offensive. My question is where does this dialog pull the method name from such that I'm getting this null reference string instead? (If I follow the suggestion and disable property evaluation, the problem goes away, but I would rather keep this feature enabled as it's a huge convenience.) Error text: Evaluating the function System.NullReferenceException

Visual Studio 2012 MVC 3 multiple unwanted threads

安稳与你 提交于 2019-12-13 03:44:13
问题 I have an MVC 3 C# project that I created and have been using in Visual Studio 2012. I am also using the entity framework. When debugging, I get the known "The process or thread has changed since last step." message on the debugging icon. For some time, it didn't change the behavior of the program so I ignored it. Recently, however, I have had the same message and behavior (with the debugger jumping back to the beginning of the executed method where my breakpoint is) except that now my code

Debugging System.Threading

此生再无相见时 提交于 2019-12-13 03:32:56
问题 Is it possible to debug System.Threading library? I have a stack trace that looks somewhat like this: I have followed all the steps I could see on how to debug .NET libraries. Uncheck 'Enable Just My Code' Check 'Enable .NET Framework source stepping' Check 'Enable Source Sever Support' Check 'Microsoft Symbol Servers' under Symbol file (.pdb) locations And yet when I try to debug a System.threadin call, I get a file not found page that asks me to Browse and Find the .cs file. Something like