You can disable script debugging by overriding the registry settings that control it. The correct way to do this is to implement the IDocHostUIHandler interface, and specifically the IDocHostUIHandler::GetOptionKeyPath or IDocHostUIHandler::GetOverrideKeyPath methods. Use GetOptionKeyPath to ignore all the user's IE settings (e.g., font size) and use IE defaults, or GetOverrideKeyPath to use most of the user's IE settings but override a few specific ones.
The MSDN articles linked above contain good documentation on how to use this interface, as well as sample implementations of the IDocHostUIHandler interface and its methods.
Say that your GetOptionKeyPath method returns "SOFTWARE\MyCompany\MyApp\IE"
as the new registry path. To ensure that script debugging is disabled, you would need to create the HKEY_CURRENT_USER\Software\MyCompany\MyApp\IE\Main
registry key, then create a string value named Disable Script Debugger
having the value yes
.