I need to capture script errors in MS IE activex control (dubbed as WebBrowser).
As I see it, this is done by implementing the IOleCommandTarget interface in my appl
This is the silliest bug in ages! No seriously!
MS, you really SUCK on this one ;)
I got it working, my code was actually correct from the beginning (ie, two days ago ;))
As the article said, you need Disable Script Debugging (Internet Explorer)
unchecked.
BUT Disable Script Debugging (Other)
must be checked (in Internet Options > Advanced).
Weird huh? I got the tip from here: http://www.delphigroups.info/2/9/938468.html (2005-04-29 09:42:48 PM).
Yes, that's 6 years ago. I'm surprised, no, amazed, that such a thing could be possible and not documented anywhere.
Edit: Programmatic fix:
uses Registry;
// ...
with TRegistry.Create do
try
RootKey:=HKEY_CURRENT_USER;
if OpenKey('\Software\Microsoft\Internet Explorer\Main',False) then begin
WriteString('DisableScriptDebuggerIE','no');
WriteString('Disable Script Debugger','yes');
CloseKey;
end;
finally
Free;
end;
// ...