Results 1 to 12 of 12

Thread: Debugging dotnet DLL

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Debugging dotnet DLL

    can i debug Csharp DLL in vb6?.... plz help

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Debugging dotnet DLL

    If you don't have the source... No.

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Debugging dotnet DLL

    You need to have Visual Studio.NET of the same version or a compatible version that the dll was written in. Then if you have that you need the source code like randem posts. Then after that you would need to create a test project in .NET to allow you to debug during runtime.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Re: Debugging dotnet DLL

    i have source code and tlb file

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Debugging dotnet DLL

    Then what version of .NET was it writen in? Also, was it written in VB.NET or C#?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Debugging dotnet DLL

    The source to the CSharp file? If you have the source to that file and the source to the vb file. You can compile each with the create Symbolic Debugging Info switch and you can load the source and the exe into the VS C++ workspace and debug it from there.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Re: Debugging dotnet DLL

    thx Rob

    Then after that you would need to create a test project in .NET to allow you to debug during runtime
    why i need test project?
    can i break directly into .NET DLL?

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Re: Debugging dotnet DLL

    yes, source code is in CSharp file
    it's in VS.NET 2003

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Debugging dotnet DLL

    Yes, since you are going to be running the dll source code it needs the same environment as it compiled use. So you would add a reference to your dll source code project from the test project. You will have to simulate the things you are doing in VB 6 but in VB.NET as you cant debug across them.


    Thread Moved
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    120

    Re: Debugging dotnet DLL

    i have vb6 application which use CSharp DLL through TLB file so if i call CSharp DLL will it break?
    CSharp DLL also running and i have set CSharp DLL(TLB) in my vb6 project

  11. #11
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Debugging dotnet DLL

    Quote Originally Posted by xor83
    i have vb6 application which use CSharp DLL through TLB file so if i call CSharp DLL will it break?
    CSharp DLL also running and i have set CSharp DLL(TLB) in my vb6 project
    If I've understood the explanation of your setup correctly, no, it won't break in.

  12. #12
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Debugging dotnet DLL

    Actually... it is possible....
    Start the application, not in the IDE though....
    Fire up VS2005 -- ooh... I see you have 2003.... I think this will still work...
    Load up the project in the VS2003 IDE.... then from the Debug menu, select Attach to Process... you should get a listing of all processes runnig. Find your app.... and select it...
    in the code, set your breakpoints where you want them in the .NET code....
    switch back to your app and do what ever you need to do that invokes the call to the .NET DLL.... it *should* break at your break points....

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width