Solved

How debug ActiveX komponents?

Posted on 2000-04-17
1
247 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

831 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