• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

.NET - Problem in Debugging - Step Into F11


This is the problem thats occuring:

In the Solution I have, I have 2 projects - one is a Windows Application - and the second is a C# DLL file that has functions and classes defined. The Windows form calls a function in the C# file, when a button is clicked in the form.

I am trying to debug this function. Single step debug using Step into (From Debug menu) or F11 as the shortcut. However, when I hit F11 to step into the function, .NET will not go and allow me to debug the funtion one line at a time. It will not go to the function in the C# DLL at all, but rather behaves as if I hit "Step Over F10" and proceeds to next line of code in windows form without going to the C# DLL.

I have the reference of the C# Dll in the Windows app. Also tried putting Break points in the C# DLL. But inspite of the breakpoints, it will not single step in the C# code, but move over to next line in the windows app.

Is there a setting? I am connected to Source safe for this solution and all files are checked out. Even tried working disconnected but same problem. I do not think its a .NET install problem because for other locally created projects, the debug feature works ok...

Please suggest some ways out of this crazyiness.

1 Solution
Hi there,

I could be totally way off here, I don't have a great deal of knowledge in this area but..

Isn't it the case that once you've compiled to the Intermediate Language (IL) to create an exe, dll etc, that you can only see that code using the available IL disassembler?ILDASM or something like that. Unless you have the original source code for the dll of course!

All the best

Éric MoreauSenior .Net ConsultantCommented:
See if the config mode of your DLL is set to Debug (instead of Release).
As emoreau states.  When in Release mode you cannot debug something by stepping into it, you can't even stop on breakpoints.  I've run across this several times myself.  You can right-click on your Solution and select Configuration Manager and see the Debug/Release state of everything.  Make sure the one you are interested in is in Debug Mode.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

SaumilAuthor Commented:
I am in Debug mode. Also have original source code.
When you add the reference to the library, make sure you select if from the 'projects' tab of the 'References' dialog, don't browse for the file.

HI saumil,

If you have the original source code for the dll, you can debug into it. I dont have much experience in asp.net, but in windows application i do the same thing as below.

Suppose you have solution named a.sln

Open a.sln
a.sln has b.dll included as reference in it.
Now left open only the a.sln solution file and close all other solution files.
Now open your classes from b.dll (which source code you are already having) in the a.sln
When only a.sln is open and you will click any .cs file from the b.dll source code, it will automatically open into the a.sln solution.
Now once the classes are there opened in the a.sln, if you will debug in the a.sln and you are using any function from the .cs files of that dll, it will go into that .cs file for debug.

As far as i concerned, i have done the same thing, and its working.

Hope this helps you.
Good Luck.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now