Open jasonfma opened 8 years ago
IntelliJ is now public with react native debugging support. https://www.jetbrains.com/idea/whatsnew/#v2016-3-react-native
Linking the VS Debugging issue https://github.com/realm/realm-js/issues/583
Latest error against 1.0.2
Is there any workaround for this issue? It kind of sucks that I cannot debug my application because of realm.
I've been using the default chrome/web browser debugger.
+1
I wasted several hours on this :( - browser debugger is you only choice. realm/lib/index.js - Line 26 (getContext()) appears to have some custom logic for detecting if it's using Chrome or not. It appears IntelliJ isn't sending a userAgent to pick up on either.
Here's a debug dump - breakpoint at https://github.com/realm/realm-js/blob/v1.8.1/lib/index.js#L29
I'm not sure why process + '' === '[object process]'
is in there, but if I remove that and toss this inside the function, my IntelliJ Debugger for RN works just fine:
if ('env' in process && 'NODE_ENV' in process.env) {
return 'chromedebugger';
}
See also #1530.
This is super early lead. WebStorm is starting to support React Native debugging (https://blog.jetbrains.com/webstorm/2016/10/webstorm-2016-3-eap-163-6512/) and I tried it out and ran into what looks to be the same constructor issue as we saw in VS Code debugging.