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 1, 2022
1 parent 94989fa commit 81a0f49
Show file tree
Hide file tree
Showing 3 changed files with 14 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 @@ -165,6 +166,7 @@ export default async function run(
startUrl,
args,
desktopNotifications,
verbose,
};

if (!target || target.length === 0 || target.includes('firefox-desktop')) {
Expand Down
3 changes: 3 additions & 0 deletions src/extension-runners/firefox-desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export class FirefoxDesktopExtensionRunner {
const {
browserConsole,
devtools,
verbose,
extensions,
firefoxBinary,
preInstall,
Expand Down Expand Up @@ -243,6 +244,8 @@ export class FirefoxDesktopExtensionRunner {
firefoxBinary,
binaryArgs,
extensions,
verbose,
devtools,
});

this.runningInfo.firefox.on('close', () => {
Expand Down
12 changes: 9 additions & 3 deletions src/firefox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ export async function run(
firefoxBinary,
binaryArgs,
extensions,
devtools,
verbose,
}: FirefoxRunOptions = {}
): Promise<FirefoxInfo> {

Expand Down Expand Up @@ -164,9 +166,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 81a0f49

Please sign in to comment.