.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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.