Skip to content

Support raw console.trace in wrapped mode #151

@pedrolamas

Description

@pedrolamas

By default, console.trace() will also output the javascript stack trace, but once we wrapConsole(), it stops doing that!

Here's a sample codesandbox showing the problem: https://codesandbox.io/s/console-trace-missing-stack-trace-6jh8s7?file=/src/index.js

Just open the above link on the browser, press F12, and check the output on the console:

image

On the above, you can see the stack trace just under the "unwrapped", but it is missing from below the "wrapped" call

Activity

changed the title [-]Wrapping console hides stack trace from `console.trace()` calls[/-] [+]Support `consola.trace`[/+] on Apr 10, 2023
changed the title [-]Support `consola.trace`[/-] [+]Support raw `console.trace` in wrapped mode[/+] on Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pedrolamas@pi0

        Issue actions

          Support raw `console.trace` in wrapped mode · Issue #151 · unjs/consola