Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

LocalOverride Request regular expression broke dev tools

Hello,

I'm using Safari 18.2 on Sonoma 14.6.1. I was using the Developer Tools to do a Local Request Override in the Source tab for a CSS file that had a changing query string. I thought I had a good regular expression to catch all variants, but apparently it was too generic and possibly wrong, and made both Source and Network tabs no longer work in my Safari.

The regular expression I entered for the Local Request Override was: //build/style.css(?.*)?$

Now my dev tools is broken to the extent that the Source and Network tabs no longer work. The slide-out panel on Source that shows Breakpoints, LocalOverrides, etc no longer shows. The toggle for it does, but does nothing now. UI in general looks a little wack on both tabs.

So, since I can't turn off the Local Request Override, I've been trying to locate where Safari may have stored it to manually delete it. Not having a lot of luck on that front.

It seems to me that Safari was unable to escape my regular expression correctly and it then causes additional issue. Just a guess though.

Any advice or help in getting Safari Source & Network working again / manual removal of the LocalOverride would be greatly appreciated. I'm fluent in OSX and Linux, but grep was not much help surfacing anything that worked.

Thanks in Advance, possibly a Safari bug as well.

Sorry for seeing this so late. Unfortunately, you've hit a bad bug in Web Inspector caused by an invalid regular expression in a Local Override.

A fix was made and will be shipped in an upcoming update: https://bugs.webkit.org/show_bug.cgi?id=294072

There is currently no way to reset Web Inspector settings to recover from this state. But there is a workaround.

In Web Inspector Settings > Experimental, enable the setting labeled "Allow Inspecting Web Inspector".

Next, right click anywhere in Web Inspector and select "Inspect Element". This opens a second inspector window that inspects the Safari Web Inspector itself. Go to the Storage tab, select Indexed Databases, select "com.apple.WebInspector", then select "local-resource-overrides". Clear this object store that contains the Local Override rule with the invalid regular expression.

All Local Overrides will be removed.

Finally, close and reopen the original Web Inspector, the one that inspects the page.

This will get Web Inspector out of the broken state until an upcoming Safari update will solve the issue automatically.

In the future, please file bugs about Web Inspector on https://bugs.webkit.org or via Feedback Assistant.

LocalOverride Request regular expression broke dev tools
 
 
Q