简体   繁体   中英

vscode debugging with react+babel

I have a project which these scripts:

  • "dev": "babel-node --presets 'react,es2015' src/server.js"
  • "start": "NODE_ENV=development babel-node --presets 'react,es2015' src/server.js"
  • "build": "NODE_ENV=development webpack -p"

I want to know how launch.json should be wrote to debug with VScode.

You can use debugger; statement, you can set it in your code and when you will run the app, automatically will get in a debug mode on the Browser.

Please read about debugger statement on the link below https://www.w3schools.com/jsref/jsref_debugger.asp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM