Visual Studio Code debugging
See original GitHub issueI have an issue with Realm and VSCode debugging, i’m unable to debug because apparently the Realm constructor is missing.
[vscode-react-native] Finished executing: react-native run-ios --simulator iPhone 6s --project-path ios
node --debug-brk=35498 launchReactNative.js 9090
Debugger listening on [::]:35498
[vscode-react-native] Downloaded debuggerWorker.js (Logic to run the React Native app) from the Packager.
[vscode-react-native] Starting debugger app worker.
[vscode-react-native] Established a connection with the Proxy (Packager) to the React Native application
[vscode-react-native] Debugging session started successfully.
Missing Realm constructor - please ensure RealmReact framework is included!
Module AppRegistry is not a registered callable module.
Then, if I Stop Remote JS Debugging
, it works.
However, everything works fine in remote js debugging or not when I use run-android
or run-ios
instead of VSCode.
So, I guess it’s not an integration issue and something went wrong between Realm and VSCode debugging.
Environment
osx@10.11.6 node@6.2.2 npm@3.9.5 react-native@0.32.0 realm@0.14.3 vscode-react-native@0.1.6 vscode@1.4.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Debugging in Visual Studio Code
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and...
Read more >Introduction to Debugging in Visual Studio Code
Debugging is a core feature of Visual Studio Code. In this tutorial, we will show you how to run and debug a program...
Read more >Debugger Extension - Visual Studio Code
Visual Studio Code's debugging architecture allows extension authors to easily integrate existing debuggers into VS Code, while having a common user interface ...
Read more >Debug C++ in Visual Studio Code
You can debug Windows applications created using Cygwin or MinGW by using VS Code. To use Cygwin or MinGW debugging features, the debugger...
Read more >Debug Browser Apps using Visual Studio Code
The simplest way to debug a webpage is through the Debug: Open Link command found in the Command Palette (Ctrl+Shift+P). When you run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe that the work to support VSCode’s debugger has already been done in the past, the only part that needs to change is the conditional that throws the missing constructor error. Right now it checks for
window != null
which works in chrome but fails inVSCode
. You could modify the check towindow != null || __debug__ !== null
and that should cause it to work with us.Hey @charpeni,
Visual Studio Code uses a worker to execute a React Native app’s JavaScript code inside the editor process when debugging, sort of how like Chrome debugging but unfortunately distinct enough that we’ll need to figure out how we can wire up the Visual Studio Code worker to the Realm binary on the device.
I’m adding this to the backlog so we can get more research done and (hopefully) support VS Code’s sandbox debugger.