Solved

How to debug an ActiveX VB6 DLL faster?

Posted on 2012-03-30
3
339 Views
Last Modified: 2012-04-13
HI

I am developing some DLLs based on VB6 ActiveX and in my short experience on this I feel I can´t debug it quickly as I want.

I do the following:

1. create code.
2. compile it.
3. Register it, and then try it with the final application.
4. If it has errors I go back to the point 1.

I use msgbox to trigger some "errors" and finally get some clue but this is pretty slow process, I wonder if there is a debugging way just like .exe apps.

Thanks.
0
Comment
Question by:dimensionav
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
vb_elmar earned 250 total points
Comment Utility
VB can return the line where the error appeared. You can set a Stop command (see sample below), then VB stops and shows the Sub where the error appeared. In the sample below it's possible to go to the variable "a" (using the mouse cursor) . -VB shows you the value of "a" in a "tooltiptext".

Private Sub Form_Load()
On Error GoTo 12
4: Dim a As Long
6: a = "Hello"
8:
10: GoTo 14
12: MsgBox Erl: Stop
14:
End Sub
0
 
LVL 45

Assisted Solution

by:Martin Liss
Martin Liss earned 250 total points
Comment Utility
There's an article in VB6 help called 'Creating ActiveX Components' that will lead you step by step through the process including debugging.
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
Glad I could help. In my profile you'll find an article I wrote about debugging VB6. It doesn't deal with dll's but you may still find it of interest.

Marty: MVP 2009 - 2012
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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 …
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…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now