For Programmers: Free Programming Magazines  


Home > Archive > ASP > December 2004 > Debugging ActiveX controls on a web page









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Debugging ActiveX controls on a web page
Andrew Chalk

2004-12-16, 8:55 am

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.


Tom Kaminski [MVP]

2004-12-16, 3:55 pm

"Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message
news:#9MKWB24EHA.3616@TK2MSFTNGP11.phx.gbl...
> 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 ...


John Blessing

2004-12-16, 3:55 pm

"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
news:%23nxlOp34EHA.2540@TK2MSFTNGP09.phx.gbl...
> "Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message
> news:#9MKWB24EHA.3616@TK2MSFTNGP11.phx.gbl...
> VC++
> If
>
> 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


Mark Schupp

2004-12-16, 3:55 pm

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)

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message
news:%239MKWB24EHA.3616@TK2MSFTNGP11.phx.gbl...
> 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.
>
>



Tom Kaminski [MVP]

2004-12-16, 8:55 pm

"John Blessing" <newsgroup@LbeHelpdesk.com> wrote in message
news:32dpckF3linkkU1@individual.net...
> "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
> news:%23nxlOp34EHA.2540@TK2MSFTNGP09.phx.gbl...
However,[color=darkred]
debugger[color=darkred]
as[color=darkred]
>
> 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".


Andrew Chalk

2004-12-17, 3:55 pm

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

Thanks,

- Andrew
"John Blessing" <newsgroup@LbeHelpdesk.com> wrote in message
news:32dpckF3linkkU1@individual.net...
> "Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
> news:%23nxlOp34EHA.2540@TK2MSFTNGP09.phx.gbl...
However,[color=darkred]
debugger[color=darkred]
control.[color=darkred]
any[color=darkred]
as[color=darkred]
>
>
> 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
>
>



Andrew Chalk

2004-12-17, 3:55 pm

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

"Mark Schupp" <nospan@nospam.com> wrote in message
news:uaV4go44EHA.4092@TK2MSFTNGP14.phx.gbl...
> 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)
>
> --
> Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
>
> "Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message
> news:%239MKWB24EHA.3616@TK2MSFTNGP11.phx.gbl...
> VC++
debugger[color=darkred]
> If
the[color=darkred]
any[color=darkred]
>
>



John Blessing

2004-12-17, 3:55 pm




> 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.


--
John Blessing


Mark Schupp

2004-12-17, 3:55 pm

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

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message
news:uGtquPF5EHA.2180@TK2MSFTNGP12.phx.gbl...
> 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
>
> "Mark Schupp" <nospan@nospam.com> wrote in message
> news:uaV4go44EHA.4092@TK2MSFTNGP14.phx.gbl...
> directory.
> to
> debugger
> the
> any
>
>



Andrew Chalk

2004-12-18, 12:46 pm

I am.
"Mark Schupp" <notvalid@email.net> wrote in message
news:%23iS$GzG5EHA.1392@tk2msftngp13.phx.gbl...
> Are you debugging on the system where you have VC++ installed?
> If not, set up a test site on that system and debug there.
>
> --
> --Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
> "Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message
> news:uGtquPF5EHA.2180@TK2MSFTNGP12.phx.gbl...
on[color=darkred]
need[color=darkred]
in[color=darkred]
as[color=darkred]
>
>



Mark Schupp

2004-12-18, 12:46 pm

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

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message
news:OXkQwRH5EHA.3472@TK2MSFTNGP09.phx.gbl...
>I am.
> "Mark Schupp" <notvalid@email.net> wrote in message
> news:%23iS$GzG5EHA.1392@tk2msftngp13.phx.gbl...
> on
> need
> in
> as
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com