Results 1 to 4 of 4

Thread: Debug a VB DLL in the VB IDE

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2002
    Location
    Shrewsbury, Shropshire, UK.
    Posts
    30

    Unhappy Debug a VB DLL in the VB IDE

    Hi there.

    I am am currently writing a DLL to be used in a telephony application using VB.

    I am struggling however, with de-bugging my DLL. Currently I am using two instances of the VB IDE - the first instance of VB is my DLL, where I can make mods, re-compile etc. The second is a 'test' client application that uses the DLL.

    However, this method of testing is very hard work. I find I have to constantly switch between applications to make changes (obviously!) but, even worse, if I want to recompile my DLL, I have to first de-reference it in the references list of my client application, then switch to my DLL code, re-compile it, then switch back, and reference it again.

    It works fine, but it's a pain in the a$$! Is there any way in which I can host my DLL project, and a simple test project in the same instance of the VB IDE?

    What I would really like to be able to do is run my DLL at the source code level, such that when I call method etc in my DLL, I have it stop at break points etc.

    Currently, the DLL is running at the compiled level, so I am struggling to find a bug etc, I have to send output to a disk based 'log' file and then reveiew the log 'after the event' - the (lovely) intereactive de-bugging features of the VB IDE seem lost when you are working with DLL's

    I'm sure I read somewhere that it could be done, but I can't fathom it! Any help would be very appreciated - it may be that some of you guys do this every day and could save me all the head scratching!
    Ouch. My head hurts.

  2. #2
    Member
    Join Date
    Sep 2001
    Location
    Fishburn
    Posts
    45
    Choose, PROJECT, PROPERTIES.

    In the debugging tab, and select...

    Start program, and pick the application you want to test your DLL with.

    The alternative, rather than having 2 IDE's running, is to create a project group, i.e. open your DLL project, then add the test application project.

    Ensure you set the test application project as the startup project.

    This way you can modify the code in either project without the need for recompiling each time.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2002
    Location
    Shrewsbury, Shropshire, UK.
    Posts
    30
    Thanks Daz! I'll try it out this afternoon!

    Mark.
    Ouch. My head hurts.

  4. #4
    Lively Member
    Join Date
    Aug 2002
    Posts
    126
    hi,
    in your client test instaed reference to the object, use CreateObject function (late bound).
    and in your server app, u can run the dll app, and in the client add a break point where u calling the dll, now watch how the debug mode passed to the server.

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