Solved

Debugging converted VB 6.0 to VB.NET COM dlls

Posted on 2009-07-16
3
313 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with AsEnumerable(), LINQ 4 40
Set email body to html using vbscript 6 41
Regex validation 2 25
VB.NET 2008 Publish Error 2 27
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 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