Главная страница | назад





Article #17786: Debugging an OCX using Internet Explorer and BCB3

 Question and Answer Database
FAQ2786C.txt Debugging an OCX using Internet Explorer and BCB3
Category :ActiveX
Platform :Win95/NT
Product : C++Builder3.x
Question:
How do I debug an OCX with Internet Explorer and BCB3?
Answer:
This involves using an experimental feature of BCB3 that can only be done
in WinNT. First we have to edit the registry using regedit. Run regedit and goto
HKEY_CURRENT_USER\Software\Borland\C++Builder\3.0\Debugging
and add the following String Value: AllowAttach
Set the Data field on the AllowAtach Value to 1
Next step is to start up Internet Explorer. Once IE is started we need to find the PID
of IE. To do this use taskman. Once you have the PID of IE goto the command
prompt and run bcb passing the command line argument -attach:X where X is the
PID of IE. This will launch BCB3 and attach to IE. BCB3 will come up with a CPU
view of IE Select Project | Options | Directories/Conditionals and enter the path to
your OCX in the Debug source path Edit Box. Now choose View | Module, right
click in the module viewer and select Add Module. Add the full path to your OCX
in the Dialog. Click Ok and hit F9 to continue running IE. Browse to the site you
have set up that loads your OCX in IE. When IE loads your OCX it will break in
BCB3. Select View | Module agian, highlight your OCX and from here you can open
any of the source files, add breakpoints and so on.
8/4/98 9:19:24 AM

Last Modified: 01-SEP-99