Expose stacktrace on console.log and console.warn
Categories
(DevTools :: Console, enhancement)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
Details
At the moment the stacktrace is only provide for some message types:
https://searchfox.org/mozilla-central/rev/016925857e2f81a9425de9e03021dcf4251cafcc/dom/console/Console.cpp#2363-2372
bool Console::ShouldIncludeStackTrace(MethodName aMethodName) {
switch (aMethodName) {
case MethodError:
case MethodException:
case MethodAssert:
case MethodTrace:
return true;
default:
return false;
}
The original implementation goes back to Bug 920116, where performance concerns were mentioned.
For WebDriver BiDi, and for consistency with Chrome, we would like to expose stacktrace information for all console APIs, not just error/assert/trace.
This would allow users to filter out messages from unwanted sources.
Could we consider adding stacktrace information to other messages? Do we have an idea of the performance impact of such a change?
(Note: if this is not possible, I imagine we could still expose a minimal/truncated stacktrace based on the filename, line. column attached to the message)
Comment 1•21 days ago
|
||
See bug 1744705 as well which is about adding the stack trace to the platform code for both the warn
and log
messages.
Reporter | ||
Comment 2•21 days ago
|
||
Ah thanks let's close as duplicate then.
Description
•