先说Chrome,
直接在Developers/Source面板设置breakpoint就可以调试
再来就是在vscode中直接调试React,分为以下几个步骤:
- 安装Debugger for Chrome
- 常规yarn start (nom start)
- 在Debug面板中增加configuration,关联到目标地址 (http://localhost:3000)
- 然后Start debugging,设置breakpoint,然后f10, f11, f12就ok了
最后来看在vscode中调试nodejs
- 直接在Debug面板中add configuration,选择nodejs
- start debugging