Skip to content

Commit

Permalink
Merge pull request #16401 from dannon/debugging-info-statement
Browse files Browse the repository at this point in the history
[23.1] Add message showing console disable/enable, along with instructions o…
  • Loading branch information
mvdbeek committed Jul 15, 2023
2 parents 36ed2d5 + f31bc54 commit 5cd2469
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/src/onload/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export function overrideProductionConsole() {
let storedConsole = null;

const disableConsole = () => {
console.log(
"The Galaxy console has been disabled. You can enable it by running enableDebugging() in devtools."
);
storedConsole = console;
// eslint-disable-next-line no-global-assign
console = {};
Expand All @@ -28,6 +31,9 @@ export function overrideProductionConsole() {
};

const enableConsole = () => {
console.log(
"The Galaxy console has been enabled. You can disable it by running disableDebugging() in devtools."
);
if (storedConsole) {
// eslint-disable-next-line no-global-assign
console = storedConsole;
Expand Down

0 comments on commit 5cd2469

Please sign in to comment.