Keeping track of interesting places I put my feet on in the software development world.
Search This Blog
Showing posts with label Debug. Show all posts
Showing posts with label Debug. Show all posts
Sunday, March 27, 2022
Sunday, August 23, 2020
You are debugging a release build error
I went with Sam's suggestion, but after reading the docs here decided to try again. I spotted a build warning stating that some modules were optimized but I had Enable Just My Code set. I then reverted Supress JIT Optimization on module load to its original value (selected) but de-selected Enable Just My Code. I am able to debug now
Tuesday, March 26, 2019
Breakpoints in .net core library will not be hit when debugging consuming WinForms app
https://stackoverflow.com/q/55359599/1219280
Check the project's Debug information property found here: Properties > Build > Advanced (button at bottom) > Debugging information
Check the project's Debug information property found here: Properties > Build > Advanced (button at bottom) > Debugging information
Monday, October 29, 2018
Useful debugging tips for Visual Studio
https://blogs.msdn.microsoft.com/visualstudio/2017/09/18/7-more-lesser-known-debugging-tactics-for-visual-studio/
Tuesday, June 26, 2018
MSDN general guidelines for debugging with Visual Studio
Taken from https://referencesource.microsoft.com/setup.html
You can configure Visual Studio to automatically step over system, framework, and other non-user calls and collapse those calls in the call stack window. The feature that enables or disables this behavior is called Just My Code. This topic describes how to use Just My Code in C#, Visual Basic, C++, and JavaScript projects.
To debug .NET Framework source, you must have access to debugging symbols for the code. You also need to enable stepping into .NET Framework source.
You can enable .NET Framework stepping and symbol downloading in the Options dialog box. When you enable symbol downloading, you can choose to download symbols immediately or just enable the option for later downloading. If you do not download the symbols immediately, symbols will be downloaded the next time that you start debugging your application. You also can do a manual download from the Modules window or the Call Stack window.
You can configure Visual Studio to automatically step over system, framework, and other non-user calls and collapse those calls in the call stack window. The feature that enables or disables this behavior is called Just My Code. This topic describes how to use Just My Code in C#, Visual Basic, C++, and JavaScript projects.
To debug .NET Framework source, you must have access to debugging symbols for the code. You also need to enable stepping into .NET Framework source.
You can enable .NET Framework stepping and symbol downloading in the Options dialog box. When you enable symbol downloading, you can choose to download symbols immediately or just enable the option for later downloading. If you do not download the symbols immediately, symbols will be downloaded the next time that you start debugging your application. You also can do a manual download from the Modules window or the Call Stack window.
- Require Source Files to Exactly Match The Original Version
Wednesday, February 15, 2017
Why Edit and Continue is not working even though it is marked in Visual Studio ?
Because it is supported only in projects that has framework versions greater or equal to 4.5.1 (from here).
AND - your scenario is likely one of the following:
AND - your scenario is likely one of the following:
Wednesday, August 24, 2016
Unable to debug Silverlight Application
I was unable to successfully debug my silverlight application until I came across the this answer from StackOverflow (worth checking the one above it as well, although it was the 2nd that fixed my issue).
Wednesday, August 26, 2015
Ease debugging by serializing your objects
When you have a bunch of types containing an additional bunch of fields, it can be useful to be able to see all the values of a given object all at once, while debugging. Something that looks like:
In other words, I would like my types to be able to display all their properties in a stringified fashion (much like an object serialization). To accomplish this, I thought I could create a base class that overrides the ToString() method, and have all those classes inheriting from it - and sharing this same ToString() implementation. The same can be accomplished by adding an extension method to the object type, but the drawback would be I would have to cope with such method popping-up every time when intellisensing every object...
The snippet below illustrates how the discussed above can be achieved. The following will help only with primitive types. If your type has lists, for instance, you will need to add logic in how to treat it.
In other words, I would like my types to be able to display all their properties in a stringified fashion (much like an object serialization). To accomplish this, I thought I could create a base class that overrides the ToString() method, and have all those classes inheriting from it - and sharing this same ToString() implementation. The same can be accomplished by adding an extension method to the object type, but the drawback would be I would have to cope with such method popping-up every time when intellisensing every object...
The snippet below illustrates how the discussed above can be achieved. The following will help only with primitive types. If your type has lists, for instance, you will need to add logic in how to treat it.
internal class Program
{
private static void Main(string[] args)
{
public B()
{
b1 = "hello";
b2 = "world";
}
B b = new B();
Console.WriteLine(b.ToString());
//prints hello,world
}
}
public class A
{
public override string ToString()
{
List<PropertyInfo> p = this.GetType().GetProperties().ToList();
return string.Format(string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, p.Select(z => z.GetValue(this))));
}
}
public class B : A
{
public string b1 { get; set; }
public string b2 { get; set; }
}
Subscribe to:
Posts (Atom)
