Security testing had boundaries. We removed them. Meet Multi-Asset Scan across your entire attack surface. Try it now

Engineering

Nuxt.js debugging in Webstorm

How to debug Nuxt.js application on Webstorm

Nuxt.js debugging in Webstorm

Fri 18 October 2019

To debug a Nuxt.js application using webstorm:

  • Configure devtool to use eval-source-map. Devtool is a webpack setting that controls source code mapping:
  build: {
    /*
     ** You can extend webpack config here
     */
    extend(config, ctx) {
      // config.devtool = 'eval-source-map'
      if (ctx.isDev && ctx.isClient) {
        config.devtool = 'eval-source-map'
      }
    }
  }
  • (Optional) Serve your application by adding an npm target to Webstorm:

alt text
Serve Nuxt.js

  • Add a target to debug your Javascript point to your application URL:

alt text
Debug Nuxt.js

  • Set your breakpoint and start debugging.

alt text
Breakpoint Nuxt.js

Tags:

debug