Firefox: Disable automatic safe mode after crash

前端 未结 4 1734
不思量自难忘°
不思量自难忘° 2020-12-31 13:57

How to prevent firefox showing the safe mode dialog after the crash? \"enter

It blocks

相关标签:
4条回答
  • 2020-12-31 14:24

    The solution by @mmm worked until the recent Tor Browser Bundle (which uses Firefox).

    If you need an alternative, you can always delete the line

    user_pref("toolkit.startup.recent_crashes", 4);
    

    from prefs.js, for example like

    sed -i '/toolkit\.startup\.recent_crashes/d' /path/to/prefs.js
    

    or call this as

    os.system("sed -i '/toolkit\.startup\.recent_crashes/d' " +
               os.path.join('/path/to' + 'prefs.js"))
    
    0 讨论(0)
  • 2020-12-31 14:35

    Did you take a look at the configuration options in about:config, there are options for safebrowsing which might be useful.

    0 讨论(0)
  • 2020-12-31 14:46

    I have no idea how you got this and what your testing flow is. So I can't reproduce and test the solution. But Firefox Safe Mode can be disabled by setting the key toolkit.startup.max_resumed_crashes in about:config to -1.

    Here's how to start Firefox with that preference set in C# binding:

    FirefoxProfile profile = new FirefoxProfile();
    profile.SetPreference("toolkit.startup.max_resumed_crashes", "-1");
    
    IWebDriver driver = new FirefoxDriver(profile);
    
    0 讨论(0)
  • 2020-12-31 14:46

    Since Firefox 23, you can also use the environment variable MOZ_DISABLE_AUTO_SAFE_MODE to disable this dialog and the automatic safe mode.

    0 讨论(0)
提交回复
热议问题