ccleve
ccleve

Reputation: 15809

Vue has stopped showing errors in the console

I'm debugging a Vue/Nuxt app. For some unknown reason I'm no longer seeing errors in the console when my Javascript references a function or variable that does not exist. Instead, it just fails silently. For example,

methods: {
    foo() {
        doesNotExist();
    }
}

When I call foo() nothing happens, in both Firefox and Chrome. I used to see an error in the console.

I don't know whether this is Vue thing, a Nuxt thing, or a plain Javascript thing.

What did I do to mess things up?

Upvotes: 0

Views: 1205

Answers (2)

Nyssa Wilfong
Nyssa Wilfong

Reputation: 11

make sure to select Custom Levels -> Errors in your dev console:

select Custom Levels -> Errors in console

Upvotes: 1

James-Riordan
James-Riordan

Reputation: 62

Possibly Try:

methods: {
foo: function() {
    doesNotExist();
}

My personal recommendation is that you use typescript for frameworks like Vue because TypeScript is a pseudo static language that compiles into javascript (dynamic) meaning that debugging becomes infinitely easier. It’ll raise errors directly in VSCode without having to debug from devtools.

Upvotes: 1

Related Questions