Open darioceccoli opened 5 years ago
I guess this configuration is never going to work and we need instead a dap-react-native which uses the https://github.com/microsoft/vscode-react-native extension or https://github.com/jhen0409/react-native-debugger?
Yes, we have to create the corresponding register methods for dap-mode.
I checked the react native debug adapter, and it seems like it is straight forward to configure it following dap-chrome.el/dap-firefox.el/dap-node.el as an example. So if you wanna give it a try you may ping me here or in gitter. Otherwise, I will try to implement it next week when I have time window.
I can give it a try. I'll try adding a dap-react-native.el
which will get the vscode/msjsdiag.vscode-react-native
extension and use msjsdiag.vscode-react-native/src/debugger/reactNativeDebugEntryPoint.js
as debug-program
.
I started working on that on https://github.com/emacs-lsp/dap-mode/pull/118
Is it possible to debug React Native projects?
I tried creating a new
react-native
project:And I registered the following debug template:
When I execute
dap-debug
, Chrome launches correctly, the mobile app connects correctly to the debugger (on Chrome it saysDebuger session #0 active
), I see the Chrome session ondap-ui-sessions
and I see theout
window which correctly mirrors Chrome's console, but breakpoints remain in inactive state and they don't get hit.I guess this configuration is never going to work and we need instead a
dap-react-native
which uses the https://github.com/microsoft/vscode-react-native extension or https://github.com/jhen0409/react-native-debugger?The official react-native docs Debugging · React Native mention something about
using a custom javascript debugger
, but I guess it should be possible to usedap-mode
with Chrome?