Turn off script debugger programmatically

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Atul

    #1

    Turn off script debugger programmatically

    Hi,

    How can I "disable script debugger" programmaticall y using C#? Its similar
    action when we check the check box from IE (Tools | Internet Options...|
    Advanced).

    Any ideas???

    Thanks
    Atul


  • Anders Both

    #2
    Re: Turn off script debugger programmaticall y

    You can not do that (I am 99.9% sure), but you can use VB on error resume
    next, or JavaScript try-catch to catch and handle all errors.

    Best Regards

    Anders Both

    "Atul" <pyaarey@hotmai l.com> wrote in message
    news:#VTfJDQrDH A.2528@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Hi,
    >
    > How can I "disable script debugger" programmaticall y using C#? Its similar
    > action when we check the check box from IE (Tools | Internet Options...|
    > Advanced).
    >
    > Any ideas???
    >
    > Thanks
    > Atul
    >
    >[/color]


    Comment

    • Atul

      #3
      Re: Turn off script debugger programmaticall y

      Well,
      I got one way to do this.
      Please find the attached C# code.

      using Microsoft.Win32 ; //To manipulate registry settings to disable script
      debugger

      private void disableScriptDe bugger()
      {
      RegistryKey regKey =
      Registry.Curren tUser.OpenSubKe y("Software\\Mi crosoft\\Intern et
      Explorer\\Main" ,true);
      if (regKey != null)
      {
      try
      {
      string strChecked = (string)regKey. GetValue("Disab le Script Debugger");
      if (strChecked != null && strChecked.ToLo wer() != "yes")
      regKey.SetValue ("Disable Script Debugger","yes" );
      }
      catch(Exception ex)
      {
      throw new ApplicationExce ption(ex.Messag e,null);
      }
      }
      }

      Thanks
      Atul

      "Atul" <pyaarey@hotmai l.com> wrote in message
      news:%23VTfJDQr DHA.2528@TK2MSF TNGP12.phx.gbl. ..[color=blue]
      > Hi,
      >
      > How can I "disable script debugger" programmaticall y using C#? Its similar
      > action when we check the check box from IE (Tools | Internet Options...|
      > Advanced).
      >
      > Any ideas???
      >
      > Thanks
      > Atul
      >
      >[/color]


      Comment

      Working...