jhen0409 / jhen0409/react-native-debugger
Get project roots for support relative paths for JSX source in React DevTools
- Vorherrschende Sprache
- JavaScript
- Sterne
- 10.4k
- Forks
- 815
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
See https://github.com/facebook/react-devtools/pull/703, it would be better for `Show <> in Source` feature for React DevTools.
- Make [`react-native-debugger-open`](https://github.com/jhen0409/react-native-debugger/tree/master/npm-package) can detect `projectRoots`
- It will not work if debugger is already connect to packager
- Use `REACT_DEBUGGER` env with [`react-native-debugger-open`](https://github.com/jhen0409/react-native-debugger/tree/master/npm-package) for RN packager, it will included [`projectRoots`](https://github.com/facebook/react-native/blob/118e981174ae513426e2f5ddd7ee3c5860519ff7/local-cli/server/middleware/getDevToolsMiddleware.js#L32)
Also, it's possible to set a function to debugger worker, let user set the `projectRoots` in JS:
```js
if (window.setProjectRootForRNDebugger) {
window.setProjectRootForRNDebugger('')
}
```
Except the global function, it seems to be no good way without `rndebugger-open`, so we should make it `recommended to use` in the documentation.
Beitragsleitfaden
Rechercherichtung
Start with the react-native-debugger-open npm package and the REACT_DEBUGGER path described in the issue; compare how React Native's getDevToolsMiddleware.js supplies projectRoots and review PR #703. Done means projectRoots can be detected or configured for JSX source paths, with the documented recommendation for react-native-debugger-open.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react, react-native
- Bereich
- developer-experience, devtools, mobile-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100