Reputation: 15809
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
Reputation: 11
make sure to select Custom Levels -> Errors in your dev console:
Upvotes: 1
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