.NET - Problem in Debugging - Step Into F11

Posted on 2004-11-15
Last Modified: 2009-07-29

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.

Question by:Saumil
    LVL 11

    Expert Comment

    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

    LVL 69

    Expert Comment

    by:Éric Moreau
    See if the config mode of your DLL is set to Debug (instead of Release).
    LVL 15

    Expert Comment

    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.

    Author Comment

    I am in Debug mode. Also have original source code.
    LVL 10

    Expert Comment

    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.

    LVL 3

    Accepted Solution

    HI saumil,

    If you have the original source code for the dll, you can debug into it. I dont have much experience in, 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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now