Closed Bug 1931008 Opened 21 days ago Closed 21 days ago

Expose stacktrace on console.log and console.warn

Categories

(DevTools :: Console, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1744705

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)

See bug 1744705 as well which is about adding the stack trace to the platform code for both the warn and log messages.

Ah thanks let's close as duplicate then.

Status: NEW → RESOLVED
Closed: 21 days ago
Duplicate of bug: 1744705
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.