Solved

How debug ActiveX komponents?

Posted on 2000-04-17
1
250 Views
Last Modified: 2013-11-25
How can I debug ActiveX komponents in VB6.
0
Comment
Question by:mikibenek
1 Comment
 
LVL 2

Accepted Solution

by:
brice123 earned 50 total points
ID: 2725488
To debug an out-of-process component (ActiveX EXE)

1. Set breakpoints and watch expressions as needed in your class module code.

2. Run the component project by pressing CTRL+F5 or clicking Start With Full Compile on the Run menu.
The component will compile, but Sub Main will not run until the first object is created in response to a client request.

3. Start a second instance of Visual Basic, and open your test project. Set breakpoints and watch expressions as needed.

4. Run the test project. When a breakpoint is encountered in the component code, the component project receives focus.

Note  
When an out-of-process component enters break mode, focus may not immediately switch to the component project. If you click anywhere on the client, the Component Busy dialog box will be displayed. Click Switch To button to give the focus to the component project.

When you’re finished with the debugging session, close your test project before stopping the component.
Important   If you stop the component project before closing your test project, all of the objects the component was providing will be destroyed. Your test project may get errors when you try to close it.

To debug an in-process component (ActiveX DLL and controls)

1. Set breakpoints and watch expressions as needed in your class module or UserControl code.

2. Run the project group by pressing CTRL+F5 or clicking Start With Full Compile on the Run menu.
The in-process component will compile, but Sub Main will not run until the first object is created in response to a client request.

3. While debugging, you can step from the test project directly into code in the component project.

4. When you’re finished with the debugging session, click the Close button on test project’s main window to return to design mode.

Important  
Closing the test project by clicking the End button will cause all projects to close. Objects in the component will not receive Terminate events. Shutting down in this fashion will not correctly test the shutdown behavior of your component.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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 (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

730 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