Class library not stopping at breakpoints

Last post 07-24-2008 2:01 PM by jsn1. 6 replies.

Sort Posts:

  • Class library not stopping at breakpoints

    07-18-2008, 11:50 PM
    • Loading...
    • jsn1
    • Joined on 03-30-2004, 9:56 AM
    • Posts 212

    Hi all,

    I am using VS 2005 with asp.net and vb.net.

    I wrote a vb.net class library and now I am having a problem when I test it in debugging mode. It does not go inside the class code when I hit F8. I set several breakpoints inside the class and the breakpoints are not working. It does not go inside the code. But breakpoints work on the calling project.


    The class library is a DLL.

    Debug is enabled for the calling project

    Here is how I built the solution:

      - open the regular asp.net calling project.

      - add as existing project, the  class library

      - add to the asp.net project, in the  project tab, a reference to the class library

      - build

      - run in debugging mode

       - step into with F8

    To test the class I added a small function that returns a string "Hello", and it return the right value

    Breakpoints work on the calling project, but not on the class library 

    Please advice.

  • Re: Class library not stopping at breakpoints

    07-19-2008, 5:30 AM

     Could you please provide more details , how the breakpoint looks like , is the project able to load it or give you a tooltip that he couldn't load the assembly code ?

     Also try to rebuild the whole solution after doing a clean operation to your solution .

    Hosam Kamel



    Remember to click on Mark as answer on the post that helped you
  • Re: Class library not stopping at breakpoints

    07-19-2008, 1:43 PM
    • Loading...
    • jsn1
    • Joined on 03-30-2004, 9:56 AM
    • Posts 212

    The breakpoint is a line in the source code I placed a debug breakpoint.

    The project runs fine because it returns a value when it calls the class library, the problem is that it does not stop at the breakpoints

     

     

     

     

     

     

     

  • Re: Class library not stopping at breakpoints

    07-22-2008, 10:06 PM

    Hi,

    First of all, if you are using the “Release” build of the modules, please try building the modules or application under “Debug” build.

    During debugging session, did the Breakpoint show any warning message on it? If yes, you can get some clues from it. If the debugger cannot load the DLL’s .PDB file, we also cannot step into the source code.  The PDB files are debug symbols that are generated with the modules (EXE/DLL). They hold the necessary information for source code level debugging. The debugger will not load a PDB that does not match the binary being debugged (For more information, see http://msdn.microsoft.com/en-us/library/yd4f8bd1(VS.80).aspx). You can check if the debugger loads this PDB file by the following steps:

    1. Start debugging.
    2. Click “Debug” menu and then select “Windows” to enter the “Modules” window.
    3. Locate your DLL module to see if the PDB file is loaded. If the PDB file is not loaded, you can load it manually by right clicking the DLL module and then select “Load Symbols” option).

    You can get more information about debugging by refering to http://blogs.msdn.com/jimgries/pages/visual-studio-debugger-faq.aspx (Section: Breakpoints and other Execution Control).

    I look forward to receiving your test results.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Class library not stopping at breakpoints

    07-23-2008, 7:37 AM
    • Loading...
    • jsn1
    • Joined on 03-30-2004, 9:56 AM
    • Posts 212

    HI

     After testing several options I was able to see two different behaviours of the class library

    First when I declare the class library as:

     Dim pFindConnected As NetworkTrace.NetworkTrace.FindConnected

     pFindConnected = CType(sc.CreateObject("NetworkTrace.NetworkTrace.FindConnected"), NetworkTrace.NetworkTrace.FindConnected)

     it does not go inside the source code and does not stop at the breakpoints

     

    Dim pFindConnected As New NetworkTrace.NetworkTrace.FindConnected

     

    it stops at the breakpoints, but it does not run correctly

     

    Please advice

     

     

  • Re: Class library not stopping at breakpoints

    07-23-2008, 11:03 PM
    Answer

    Hi,

    Thanks for your response.

    Could you please explain "it stops at the breakpoints, but it does not run correctly"? Do you mean the breakpoint is hit but its position is changed? If so, please make sure the dll matches the source code you debugging. You can try to remove this assembly and then re-add it.

    For more information about debugging dll project, see http://msdn.microsoft.com/en-us/library/ms164704.aspx

     

    I look forward to receiving your test results.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: Class library not stopping at breakpoints

    07-24-2008, 2:01 PM
    Answer
    • Loading...
    • jsn1
    • Joined on 03-30-2004, 9:56 AM
    • Posts 212
Page 1 of 1 (7 items)
Microsoft Communities
Page view counter