Solved

How to debug an ActiveX VB6 DLL faster?

Posted on 2012-03-30
3
360 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
ID: 37788224
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 47

Assisted Solution

by:Martin Liss
Martin Liss earned 250 total points
ID: 37788294
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 47

Expert Comment

by:Martin Liss
ID: 37843287
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

733 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