Skip to content

Commit

Permalink
Promote the new --devtools command line argument and link to debuggin…
Browse files Browse the repository at this point in the history
…g online documentation
  • Loading branch information
ochameau committed Sep 6, 2022
1 parent 94989fa commit 1f14786
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/cmd/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default async function run(
target,
args,
firefoxPreview = [],
verbose = false,
// Android CLI options.
adbBin,
adbHost,
Expand Down Expand Up @@ -177,6 +178,7 @@ export default async function run(
customPrefs,
browserConsole,
devtools,
verbose,
preInstall,

// Firefox runner injected dependencies.
Expand Down
4 changes: 4 additions & 0 deletions src/extension-runners/firefox-desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type FirefoxDesktopSpecificRunnerParams = {|
customPrefs?: FirefoxPreferences,
browserConsole: boolean,
devtools: boolean,
verbose: boolean,
firefoxBinary: string,
preInstall: boolean,

Expand Down Expand Up @@ -214,6 +215,7 @@ export class FirefoxDesktopExtensionRunner {
const {
browserConsole,
devtools,
verbose,
extensions,
firefoxBinary,
preInstall,
Expand Down Expand Up @@ -243,6 +245,8 @@ export class FirefoxDesktopExtensionRunner {
firefoxBinary,
binaryArgs,
extensions,
verbose,
devtools,
});

this.runningInfo.firefox.on('close', () => {
Expand Down
14 changes: 11 additions & 3 deletions src/firefox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export type FirefoxRunOptions = {
binaryArgs?: Array<string>,
args?: Array<any>,
extensions: Array<Extension>,
devtools: boolean,
verbose: boolean,
};

/*
Expand All @@ -103,6 +105,8 @@ export async function run(
firefoxBinary,
binaryArgs,
extensions,
devtools,
verbose,
}: FirefoxRunOptions = {}
): Promise<FirefoxInfo> {

Expand Down Expand Up @@ -164,9 +168,13 @@ export async function run(
throw error;
});

log.info(
'Use --verbose or open Tools > Web Developer > Browser Console ' +
'to see logging');
if (!verbose && !devtools) {
log.info('Use --verbose or --devtools to see logging');
}
if (devtools) {
log.info('More info about WebExtension debugging:');
log.info('https://extensionworkshop.com/documentation/develop/debugging/');
}

firefox.stderr.on('data', (data) => {
log.debug(`Firefox stderr: ${data.toString().trim()}`);
Expand Down

0 comments on commit 1f14786

Please sign in to comment.