Debugging ATL control
-
Hi, I'm writing my first ATL control that will be used inside an HTML page. I used the project wizard to create a simple control, I build it and tested it in the ActiveX test container. Now I want to start making my own changes and stepping through the code a bit to see how it works. How can I test a control and set breakpoints in the Visual Studio debugger so that it stops at that point, just like a 'normal' program? Thanks.
-
Hi, I'm writing my first ATL control that will be used inside an HTML page. I used the project wizard to create a simple control, I build it and tested it in the ActiveX test container. Now I want to start making my own changes and stepping through the code a bit to see how it works. How can I test a control and set breakpoints in the Visual Studio debugger so that it stops at that point, just like a 'normal' program? Thanks.
-
Never mind, I found it (found an article on how to debug a service, it's the same for an activex control): Tools->Debug processes, attach to tstcon32 process.
You can also for a break point using
__asm int 3
. That'll halt the program and show you the "program has crashed dialog, do you wish to debug?"-dialog. From there you can attach to the program which embeds your control. -- Booohoo! -
Never mind, I found it (found an article on how to debug a service, it's the same for an activex control): Tools->Debug processes, attach to tstcon32 process.
-
You can also for a break point using
__asm int 3
. That'll halt the program and show you the "program has crashed dialog, do you wish to debug?"-dialog. From there you can attach to the program which embeds your control. -- Booohoo! -
Or set the tstcon32 as the executable for the debugsession. /Magnus
- I don't necessarily agree with everything I say