Commit 890ade9a authored by RobPruzan's avatar RobPruzan Committed by Jiachi Liu

more helpful source location debugging info

parent c0d9a80d
/**
* Do not haphazardly change the name of this file, users that do not have ignore
* listing configured will see the name of this source file in chrome devtools console
*/
export type LogMethod = export type LogMethod =
| 'log' | 'log'
| 'info' | 'info'
...@@ -93,13 +97,11 @@ export function patchConsoleMethod<T extends keyof Console>( ...@@ -93,13 +97,11 @@ export function patchConsoleMethod<T extends keyof Console>(
wrapper(methodName, ...args) wrapper(methodName, ...args)
/* /*
* This script is from Next.js console patching. * Your console call is being intercepted by Next.js, which makes your dev tools show the wrong source location.
* *
* You're seeing this because Next.js patches console methods to send logs * To see the true source location of the console method call, you can do one of the following:
* to your terminal. * - open your browser's DevTools before the log happens (ensure you have ignore listing on https://developer.chrome.com/docs/devtools/settings/ignore-list)
* * - set browserDebugInfoInTerminal to false in your next.config file.
* To see the original location, set browserDebugInfoInTerminal to false
* in your next.config file.
*/ */
originalMethod.apply(this, args) originalMethod.apply(this, args)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment