locked
Debugging a DLL from my own Visual Studio Extension RRS feed

  • Question

  • I have developed a custom my own Visual Studio Extension. And in that Extension Window, I am calling a class library (DLL) and access the Classes, Methods and Properties of those classes inside the DLL. I am allowing the user to select any method from the class and execute the method.

    Now, I have installed my own Extension in Visual Studio so that when I start Visual Studio, it appears as a window in Visual Studio similar to Solution Explorer, Properties windows. Now when the user executes a method (explained in the above paragraph), He is looking for an option to debug the method by placing the Breakpoint, Step over, etc..

    Questions I have are,

    1. How the user will place the breakpoint inside the DLL which I am calling from my own Extension Window?
    2. How the execution will enter into the source code of the DLL and allow the user to debug further using breakpoints, Step In, Step Over, etc...

    Note: I have placed the pdb file (which is being created along with DLL) in parallel to the DLL location.

    Any help on this would be really helpful. Thanks in advance.

    • Moved by CoolDadTx Thursday, May 21, 2020 2:21 PM VS related
    Thursday, May 21, 2020 10:00 AM

All replies

  • I have my own Visual Studio Extension in which I am building a class Library project and get the DLL out of it. I will be loading the DLL and call the methods inside the DLL from my Visual Studio Extension window. Is there a way to enable the debugging option, so that when it executes the method inside that DLL, it breaks at a breakpoint in the cs file.

    Thanks in Advance.

    Wednesday, May 20, 2020 10:01 AM
  • Hi vaira20ster,

    Maybe you can follow these methods to debug your dll which will be used into extesnion:

    #Go to Tools/Options/Debugging/General, disable "Just my code" option

    #(a)Open dll project in visual studio

    (b)Open another VS with your extension

    (c)In (a), Go to Debug/Attach to Process, and then attach to devenve.exe(b)  

    #Use immediate window in visual studio, please refer this document about using it to debug.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, May 22, 2020 9:16 AM