-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add react-native debugger using vscode extension #118
base: master
Are you sure you want to change the base?
Conversation
Good job! Can you update the readme (you may add a screenshot/gif as well)? The same goes for the acknowledgments section in the readme - feel free to add yourself. |
This is very much work in progress and it doesn't work yet 😕 As of {"nodeDebugPath":"/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2"} At the moment I copied that file manually in my setup, but it should be included in the setup process.
At the moment the debugger seems to attach, but when calling
because the |
It does look like it can be done 😀! Starting the I need to add the ability to start/stop the react-native packager on |
Cool.
If this is started per debug session we might need extending dap-mode.el to support running a process before starting the debug adapter. I think that there was something like that in the VScode templates. |
Normally the packager is on even when the debugger is off, eg if you don't want to debug, but you want to use Live/Hot Reloading. So it would be nice to have a M-x On the vscode extension, the functions to start/stop the packager are in the file BUT there's an alternative 🙂 By default, when starting the packager with REACT_DEBUGGER="echo A debugger is not needed: "
yarn start Even easier, it is possible to set this directly inside the react-native project's "scripts": {
"start": "REACT_DEBUGGER='echo A debugger is not needed:' && node node_modules/react-native/local-cli/cli.js start",
} This tells the packager not to start the Chrome debugger and let the debugger we started using So, long story short, I think this works as a bare bone v1, once I update readme/screenshots. |
Ehm, I forgot one thing. As I said above, the vscode extension requires to create a I need to add that to the setup step. |
@darioceccoli What's the status on this? This seems like a nice addition. |
Hi @darioceccoli, did you make any further progress on this? I use vim, not emacs (I come in peace!), but very interested and excited in potentially being able to ditch React Native Debugger/chrome and debug from inside vim instead, using vimspector or nvim-dap. I've tried to untange vscode-react-native, but it looks like the source has changed somewhat since you did this work. |
it works? |
Issue: #117