Solved

Debugging converted VB 6.0 to VB.NET COM dlls

Posted on 2009-07-16
3
315 Views
Last Modified: 2013-11-25
I have a VB 6.0 COM dll, that I can open in Visual Studio 6.0. I can set a break point, run it, and debug it.

I recently needed to convert that to a .NET project. It compiles fine, but how do I debug it.
This is what visual studio says......

"A project with an Output Type of Class Library cannot be started directly"
0
Comment
Question by:silentthread2k
  • 2
3 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 24872668
You need to create an application (windows form or console or web or ...) that calls your DLL. Only then your breakpoints will work.
0
 

Author Comment

by:silentthread2k
ID: 24872959
Well, this is a 3rd party tool that calls my dll. How can I do this?
I tried added the 3rd party exe to my solution as a project, and then setting it as a startup project, but I got the message from visual studio...

"Debugging information for "blahblah3rdpartyexe.exe" cannot be found or does not match. No symbols loaded.
0
 

Accepted Solution

by:
silentthread2k earned 0 total points
ID: 24905668
I figure it out. I just have to register my dll from same bin path that Visual Studio creates it in, which is the same path that has the ".pdb"
I needed the .pdb file for debugging purposes.
Any other registration also needs to be done from the same location as the ".pdb" file

After doing all the registration, I set my breakdown.

Then I launched the 3rd party executable. Then I went to my project and selected "Attached to Process" from the debug menu. (You must be in debug mode)

Then I went be to the executable and started doing stuff, and wallah!
When the executable called my dll, it started debugging.

I did not even need to add the 3rd party exe as a project to mysolution. Thank god, that would have been a mission.

I'm glad to know that this can be done. You just kinda have to play with it a bit.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

685 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