Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit ba8aa69

Browse files
committed
Allow dbg in the browser toolbox (#5685)
1 parent 9f718a4 commit ba8aa69

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/client/index.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import * as chrome from "./chrome";
1010
import { prefs } from "../utils/prefs";
1111
import { setupHelper } from "../utils/dbg";
1212

13-
import { isFirefoxPanel } from "devtools-config";
1413
import {
1514
bootstrapApp,
1615
bootstrapStore,
@@ -49,14 +48,12 @@ async function onConnect(
4948
await client.onConnect(connection, actions);
5049
await loadFromPrefs(actions);
5150

52-
if (!isFirefoxPanel()) {
53-
setupHelper({
54-
store,
55-
actions,
56-
selectors,
57-
client: client.clientCommands
58-
});
59-
}
51+
setupHelper({
52+
store,
53+
actions,
54+
selectors,
55+
client: client.clientCommands
56+
});
6057

6158
bootstrapApp(store);
6259
return { store, actions, selectors, client: commands };

src/utils/dbg.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { bindActionCreators } from "redux";
22
import * as timings from "./timings";
33
import { prefs, features } from "./prefs";
4+
import { isDevelopment } from "devtools-config";
45

56
function findSource(dbg, url) {
67
const sources = dbg.selectors.getSources();
@@ -56,10 +57,12 @@ export function setupHelper(obj) {
5657

5758
window.dbg = dbg;
5859

59-
console.group("Development Notes");
60-
const baseUrl = "https://devtools-html.github.io/debugger.html";
61-
const localDevelopmentUrl = `${baseUrl}/docs/dbg.html`;
62-
console.log("Debugging Tips", localDevelopmentUrl);
63-
console.log("dbg", window.dbg);
64-
console.groupEnd();
60+
if (isDevelopment()) {
61+
console.group("Development Notes");
62+
const baseUrl = "https://devtools-html.github.io/debugger.html";
63+
const localDevelopmentUrl = `${baseUrl}/docs/dbg.html`;
64+
console.log("Debugging Tips", localDevelopmentUrl);
65+
console.log("dbg", window.dbg);
66+
console.groupEnd();
67+
}
6568
}

0 commit comments

Comments
 (0)