Skip to content

Commit 0b12688

Browse files
authored
chore: suppress DevTools CDP command errors (#627)
This PR suppresses all the CDP command errors that DevTools logs via `console.error`. (mostly `Storage.getStorageKey` errors). These `console.error`s could also break MCP client that don't ignore invalid JSON on stdio.
1 parent 4695516 commit 0b12688

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DevtoolsUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
type IssuesManagerEventTypes,
1111
MarkdownIssueDescription,
1212
Marked,
13+
ProtocolClient,
1314
Common,
1415
I18n,
1516
} from '../node_modules/chrome-devtools-frontend/mcp/mcp.js';
@@ -125,6 +126,9 @@ export function mapIssueToMessageObject(issue: AggregatedIssue) {
125126
};
126127
}
127128

129+
// DevTools CDP errors can get noisy.
130+
ProtocolClient.InspectorBackend.test.suppressRequestErrors = true;
131+
128132
I18n.DevToolsLocale.DevToolsLocale.instance({
129133
create: true,
130134
data: {

0 commit comments

Comments
 (0)