sourcegraph-extension-docs

Debugging extensions is easier on Sourcegraph.com than on GitHub.com via the browser extension, so open up a file such as https://sourcegraph.com/github.com/gorilla/mux/-/blob/mux.go

First, make sure your extension is active by opening your browser developer tools and running localStorage.debug=true and refreshing the page. You should see a little Ext debug button:

Turning on “Log to devtools console” will show messages being passed back and forth such as:

console.log statements in your Sourcegraph extension will show up in the developer tools pane in your browser.

You can set breakpoints by first finding your Sourcegraph extension script that’s running in a web worker: