Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Vue 3 errors only shown when debugging with Vue Devtools #1087

Closed
@dangrima90

Description

@dangrima90

I'm having an issue related to error logs. I've noticed that whenever errors happen I'm only able to see them logged when switching on Vue Devtools.

Example:

In App.vue I'm throwing an error to showcase the behaviour:

created() {
  throw new Error('TEST ERROR!');
}

Without running Vue Devtools in the browser console I don't see the error or even warning. In the terminal I see the following:

[Vue warn]: Unhandled error during execution of created hook
  at <App key=0 >
  at <Root>

The above makes sense, however the error is still not shown. Once I switch on Vue Devtools by using --env.vueDevtools I then see the error in the terminal:

[Vue warn]: Unhandled error during execution of created hook
  at <App key=0 >
  at <Root>
Unhandled promise rejection Error: TEST ERRROR!

And in the browser I also see the error plus the stacktrace as expected:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions