-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use vscode-js-debug as the debugger implementation #1001
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Refactors the changes introduced in #964 to separate logging metro messages and JS debugging into separate DAP Sessions. This will also make integrating #1001 easier with other changes made to `DebugAdapter`. ### How Has This Been Tested: Open an app and check the debugger still works correctly: - breakpoints and uncaught errors should still stop the application - debugger controls in the preview should resume/step over breakpoints - check profiling still works - check if Metro errors are logged to the debug console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found three problems with this implementation:
- RNIDE_log is never trigered
- uncaught exceptions are disabled, by default in this implementation which is a change compared to the previous one and might cause users to think that they stoped working, also this is a departure from "unhandled exception overlay"
- the stack of unhandled exception seems to be lacking some parts in
react-native-78
test app when you click on throw error button

Screen.Recording.2025-03-10.at.19.46.39.mov
You mean "RNIDE_consoleLog"?
It is, but it's also by design. Since we've got the toggle now, I think we should respect it instead of always handling the thrown exceptions.
Yep. In this case, I feel that changing the behavior in this way provides a better experience. |
Uses
js-debug
's implementation of the JS debugger for targets which support it (Hermes with RN version >= 0.76).This allows us to use the features already implemented there (exception breakpoints, conditional breakpoints) without having to reimplement them, and possibly allows us to remove our CDP debugger implementation in the future, once we drop support for the older RN versions.
We patch
vscode-js-debug
in order to:js-debug
'snode
debug session typeWe use the
vscode-cdp-proxy
package for implementing the CDP proxy sitting between thejs-debug
debugger implementation and the application.We patch it to:
id
fieldHow Has This Been Tested:
test-apps
repo