zthxxx / react-dev-inspector

jump to local IDE code directly from browser React component by just a simple click
https://react-dev-inspector.zthxxx.me
MIT License
1.15k stars 68 forks source link

这个库能实现错误代码定位吗? #109

Closed a982564562 closed 2 years ago

a982564562 commented 2 years ago

如题,页面报错时能回到ide中出错文件的位置吗?

zthxxx commented 2 years ago

@a982564562 你说的是 react 默认就有的吧

a982564562 commented 2 years ago

@a982564562 你说的是 react 默认就有的吧

https://github.com/facebook/create-react-app/blob/c7627ce96c4674f327081f101dd0e2771be4d045/packages/react-error-overlay/src/containers/StackFrame.js 是的,它的源码里有个点击事件的判断,我在你的源码里没找到

zthxxx commented 2 years ago

所以需要这个功能的话,react 默认就有, react-dev-inspector 就没必要做了