realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.78k stars 575 forks source link

when debug with WebStrom IDE. error: Missing Realm constructor. #1429

Open fee-studio opened 7 years ago

fee-studio commented 7 years ago

When I use the way to debug app, it's crash. Error is "Missing Realm constructor". But, debugger use chrome is no problem.

Of course, I had tried this way, but NOT work!

error log

/usr/local/bin/node --debug-brk=56707 --expose_debug_as=v8debug /Applications/WebStorm.app/Contents/plugins/JavaScriptDebugger/proxy/launcher.js --port=8081 --sourcesStoragePath=/Users/efeng/workspace/Pomodoro/code/rn-pomodoro/.tmp/reactNativeBuild
Debugger listening on [::]:56707
[intellij] Downloaded debuggerWorker.js (Logic to run the React Native app) from the Packager.

[intellij] Starting debugger app worker.

[intellij] Established a connection with the Proxy (Packager) to the React Native application

[intellij] Debugging session started successfully.

Missing Realm constructor. Did you run "react-native link realm"? Please see https://realm.io/docs/react-native/latest/#missing-realm-constructor for troubleshooting
Module AppRegistry is not a registered callable module (calling runApplication)
Running application PomodoroApp ({
    initialProps =     {
    };
    rootTag = 1;
})
Unhandled JS Exception: Missing Realm constructor. Did you run "react-native link realm"? Please see https://realm.io/docs/react-native/latest/#missing-realm-constructor for troubleshooting
Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

Version of Realm and Tooling

kneth commented 7 years ago

@iosfeng Thanks for reporting. We haven't tested Realm with WebStorm so we can't give you any useful suggestions. I suggest that you report the issue to Jetbrain too.

fee-studio commented 6 years ago

Well, only use chrome now. Thanks~ BUT, hope you can test Realm with WebStorm.

kneth commented 6 years ago

@iosfeng I will move the issue to our backlog so we don't forget it :-)

fee-studio commented 6 years ago

COOL~ thx~

krangiosdev commented 6 years ago

This might be the solution. Can anyone test it and add the feature. https://github.com/realm/realm-js/issues/1530

kneth commented 6 years ago

@iosfeng Can you give it a shot?