Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you disallow DebuggerNonUserCodeAttribute from being placed on the code generated by the dataset designer?

I would like to step through dataset designer code in an ASP.NET project. How can I ensure that this:

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 

is not included on the code it generates?

like image 227
Irwin Avatar asked Jun 25 '09 15:06

Irwin


People also ask

How do I disable just my code in Visual Studio code?

To enable or disable Just My Code in Visual Studio, under Tools > Options (or Debug > Options) > Debugging > General, select or deselect Enable Just My Code.

What does enable just my code do?

From Visual Studio Docs: Enable Just My Code: The debugger displays and steps into user code ("My Code") only, ignoring system code and other code that is optimized or that does not have debugging symbols.

What is DebuggerStepThrough?

Marking a piece of code using DebuggerStepThrough attribute tells the Visual Studio debugger that, the code block will be stepped over from debugging process. you can mark methods, properties with DebuggerStepThrough attributes where you don't want to stop your code to break.


1 Answers

You cannot prevent this from happening. However, you can enable stepping through properties, methods that are tagged with this attribute by disabling Just My Code.

Go to Tools -> Option and select the Debugger node. One the right there should be a check box with the text containing "Enable Just My Code". Uncheck that box and you will be able to step into your dataset code.

like image 170
JaredPar Avatar answered Nov 15 '22 03:11

JaredPar