Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET framework source stepping not working despite options set

I have these options enabled, as shown in this screenshot:

screenshot

I also have the System.Windows.Forms.dll module selected:

screenshot

Yet it steps over the code. Specifically, I have this code in a subclass of ListBox:

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
    return base.ProcessCmdKey(ref msg, keyData);
}

I tried to set a breakpoint there and then step into this with F11, but it just steps over.

What is missing to get this to work?

like image 531
Timwi Avatar asked May 21 '11 19:05

Timwi


People also ask

How do I Debug .NET core source?

To debug . NET and ASP.NET Core source code in Visual Studio: In Tools -> Options -> Debugging -> General, un-check Enable Just My Code. Verify Enable Source Link support is checked.

How do you Debug a source code?

Drag and drop the generated source files you want to debug into Visual Studio. Place break points in the source code in Visual Studio. Open the menu option Debug > Attach to Process Ctrl + Alt + P in Visual Studio. Select menu option Run > Resume, if you selected Debug as > Real Time Application in RSA-RTE.


1 Answers

They didn't release the source code for the latest patch for .NET 4.0 that comes with VS2010 SP1 so if you have that installed, it won't be able to find the right source files thus not be able to display it. That's the exact behavior with me also. Rolling back the update solves the problem but then I don't get to use the goodies that come with SP1.

If you select the option to print diagnostic messages, you'll get the warning that sources cannot be found at the server. You can download the RTM source from referencesource.microsoft.com and manually browse the sources otherwise.

like image 184
Teoman Soygul Avatar answered Oct 23 '22 01:10

Teoman Soygul