Debugging ActiveX controls on a web page

A

Andrew Chalk

I have an ASP 3.0 page that contains an ActiveX control that I wrote in VC++
v6.0. Under Visual Interdev I can debug the ASP code just fine. However,
when I get to an ASP line that references my ActiveX control the debugger
does not go inside my C++ code allowing me to debug the ActiveX control. If
I load the ActiveX control project from VC++ with Internet Explorer as the
debug executable I have the same problem. Break points in the ActiveX
control's code are not respected. I know I'm compiling in Debug mode, any
idea how to get these breakpoints to be respected?

Many thanks.
 
T

Tom Kaminski [MVP]

Andrew Chalk said:
I have an ASP 3.0 page that contains an ActiveX control that I wrote in VC++
v6.0. Under Visual Interdev I can debug the ASP code just fine. However,
when I get to an ASP line that references my ActiveX control the debugger
does not go inside my C++ code allowing me to debug the ActiveX control. If
I load the ActiveX control project from VC++ with Internet Explorer as the
debug executable I have the same problem. Break points in the ActiveX
control's code are not respected. I know I'm compiling in Debug mode, any
idea how to get these breakpoints to be respected?

I'm not sure how you have ASP code that references an ActiveX control, as
ASP is server-side and ActiveX controls are client side ...
 
J

John Blessing

Tom Kaminski said:
I'm not sure how you have ASP code that references an ActiveX control, as
ASP is server-side and ActiveX controls are client side ...


I presume he meant an Activex dll, which certainly can be used by asp.

In answer to the OP, I don't have experience of VC++, but the similar
situation occurs in VB and what you have to do is unregister the current
dll:

c:\winnt\system32\regsvr32 "c:\yourdll.dll" -u

This prevents calls from the asp pages to this dll going to the compiled dll
and instead will go to your code in the ide. You have to start the debug
from within the Visual C++ ide.


--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
 
M

Mark Schupp

Is the control server-side(called from ASP script code to do something on
the server) or client-side.

If server-side (this may not be the simplest but it works for me):

Set application protection to "low" for the indicated virtual directory.
Launch task manager and find the inetinfo process.
Right-click on the process and select "debug". If you have VC++ on the
system you should be take into the C++ debugger.
Open your project files and set breakpoints as desired (you may need to
run the affected web page once to load the control dll)
 
T

Tom Kaminski [MVP]

John Blessing said:
I presume he meant an Activex dll, which certainly can be used by asp.

Perhaps - but that's more commonly known as a "server component".
 
A

Andrew Chalk

Thanks John. I unregistered the control. What should I set as the target
executable in VC++? Internet Explorer?

Thanks,

- Andrew
 
A

Andrew Chalk

Thanks mark. Attempting to debug INETINFO gives me an error dialog that
says:

"The /E command line switch must be followed by an event handle"

Any idea how to get around this?

Thanks,

Andrew
 
J

John Blessing

Thanks John. I unregistered the control. What should I set as the target
executable in VC++? Internet Explorer?

Thanks,

As I said, I am just relating this to my experience of debugging an activex
dll written in VB. In the VB Ide, I would: Project menu, Properties,
Debugging tab, select the "Start browser with url" option and specify a .asp
page on my local webserver that instantiates the activex dll object and
calls one of its methods.
 
M

Mark Schupp

Are you debugging on the system where you have VC++ installed?
If not, set up a test site on that system and debug there.
 
M

Mark Schupp

I don't know what it could be. I have been debugging server-side components
(vb6 and vc++) that way for several years.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top