robskrob
robskrob

Reputation: 2898

How to use chrome breakpoint debugging tools with VueJS?

I develop with VIM, and I am trying to find a way to use chrome breakpoints for my frontend Vue.js app. I'm also using nuxt to develop my app with Vue.

Has anyone been able to successfully set a breakpoint in chrome without having to use vscode as their editor? If so what changes did they have to make?

For clarity's sake, I have of course tried entering debugger into my JS code, and I have also clicked on the left side of the source file in the chrome to apply a breakpoint on a particular line. Neither of these ways of applying a breakpoint have worked for me.

Upvotes: 1

Views: 1521

Answers (1)

soroush
soroush

Reputation: 756

As I know There 2 way to use break point in these framework :

First, add debugger; in your code where you want like below:

  methods: {
    test() {
      let x = 15 * 5
      debugger
      //// other code
    }
  },

Second, open developer mode in source file found the place you want to have break point and click left side of it :)

Upvotes: 2

Related Questions