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

Commit

Permalink
Allow dbg in the browser toolbox (#5685)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonLaster committed Mar 18, 2018
1 parent 9f718a4 commit ba8aa69
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 6 additions & 9 deletions src/client/index.js
Expand Up @@ -10,7 +10,6 @@ import * as chrome from "./chrome";
import { prefs } from "../utils/prefs";
import { setupHelper } from "../utils/dbg";

import { isFirefoxPanel } from "devtools-config";
import {
bootstrapApp,
bootstrapStore,
Expand Down Expand Up @@ -49,14 +48,12 @@ async function onConnect(
await client.onConnect(connection, actions);
await loadFromPrefs(actions);

if (!isFirefoxPanel()) {
setupHelper({
store,
actions,
selectors,
client: client.clientCommands
});
}
setupHelper({
store,
actions,
selectors,
client: client.clientCommands
});

bootstrapApp(store);
return { store, actions, selectors, client: commands };
Expand Down
15 changes: 9 additions & 6 deletions src/utils/dbg.js
@@ -1,6 +1,7 @@
import { bindActionCreators } from "redux";
import * as timings from "./timings";
import { prefs, features } from "./prefs";
import { isDevelopment } from "devtools-config";

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

window.dbg = dbg;

console.group("Development Notes");
const baseUrl = "https://devtools-html.github.io/debugger.html";
const localDevelopmentUrl = `${baseUrl}/docs/dbg.html`;
console.log("Debugging Tips", localDevelopmentUrl);
console.log("dbg", window.dbg);
console.groupEnd();
if (isDevelopment()) {
console.group("Development Notes");
const baseUrl = "https://devtools-html.github.io/debugger.html";
const localDevelopmentUrl = `${baseUrl}/docs/dbg.html`;
console.log("Debugging Tips", localDevelopmentUrl);
console.log("dbg", window.dbg);
console.groupEnd();
}
}

0 comments on commit ba8aa69

Please sign in to comment.