Skip to content

Commit ec3a826

Browse files
authored
Update README.md
added new solution for debugging
1 parent a585faa commit ec3a826

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,27 @@ The React Native CLI will do everything just as without a template and afterward
4545

4646
### Does debugging work too?
4747

48-
Yes it does. Some users reported that they got an error about relative paths when they tried to debug inside Visual Studio Code. In this case check out the [fix by Mo Mac](https://medium.com/@nocnoc/great-work-f0b5ef365ca6).
48+
Yes it does, but you need to enable the `sourceMap` option in the `tsconfig.json`.
49+
50+
Make sure it looks something like this:
51+
```json
52+
{
53+
"compilerOptions": {
54+
"allowSyntheticDefaultImports": true,
55+
"esModuleInterop": true,
56+
"jsx": "react",
57+
"module": "es6",
58+
"moduleResolution": "node",
59+
"noEmit": true,
60+
"noImplicitAny": true,
61+
"target": "es6",
62+
"sourceMap": true
63+
},
64+
"exclude": ["node_modules"]
65+
}
66+
```
67+
68+
This is not enabled by default as it is unknown if it has any negative effects on the transpilation time. For more information make sure to check out the [post by Nicolas Hémonic](https://medium.com/@NicolasHemonic/hi-mo-mac-d18286202602).
4969

5070
## :globe_with_meridians: Links
5171

0 commit comments

Comments
 (0)