Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Debugging converted VB 6.0 to VB.NET COM dlls

Posted on 2009-07-16
3
Medium Priority
?
339 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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.
Suggested Courses

782 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