Reputation: 13570
I'm using a simple v-on:click="demo" method that is attached to my input. In my demo function I use debugger statement to stop JavaScript engine execution. The problem is that debugger statement throws none sense errors in es-lint module. My question is simple. How to make debugger work ?
Code
export default {
name: "Demo",
methods: {
demo: function () {
console.log('Running demo')
debugger
}
}
}
Error
Failed to compile.
./src/components/Demo.vue
Module Error (from ./node_modules/eslint-loader/index.js):
/app/src/components/Upload.vue
2:1 warning Insert `··` prettier/prettier
3:1 warning Insert `··` prettier/prettier
...
...
Upvotes: 1
Views: 2374
Reputation: 13570
I found the problem. Apparently, ES-linter disallows debugger statement rule. To make debugger work again I had to add // eslint-disable-line
comment to my debugger line. Below lines of code solved the debugger error.
debugger // eslint-disable-line
or
/* eslint-disable no-debugger */
debugger
Upvotes: 2