add react-native debugger using vscode extension#118
add react-native debugger using vscode extension#118darioceccoli wants to merge 2 commits intoemacs-lsp:masterfrom
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 startEven 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