Skip to content

Improve Chrome debugger#5715

Closed
frantic wants to merge 2 commits intofacebook:masterfrom
frantic:custom-dbg
Closed

Improve Chrome debugger#5715
frantic wants to merge 2 commits intofacebook:masterfrom
frantic:custom-dbg

Conversation

@frantic
Copy link
Copy Markdown
Contributor

@frantic frantic commented Feb 2, 2016

debugger.html contained a ton of hacky code that was needed to ensure we have a clean JS runtime every time a client RN app connects. That was needed because we used the page's global environment as runtime. Some time ago WebWorker support was added and now we run RN code inside an isolated WebWorker instance, and we can safely get rid of all these hacks.

This has a bunch of nice side-effects: debug reload works faster, console.logs are preserved, debuggerWorker.js selection doesn't change.

Made sure the debugging (breakpoints, etc.) still works as before.

Small demo

@facebook-github-bot
Copy link
Copy Markdown
Contributor

By analyzing the blame information on this pull request, we identified @frantic, @longdivision and @oveddan to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Feb 2, 2016
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@frantic updated the pull request.

@skevy
Copy link
Copy Markdown
Contributor

skevy commented Feb 5, 2016

🚀 🚀 🚀

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@frantic updated the pull request.

@frantic
Copy link
Copy Markdown
Contributor Author

frantic commented Feb 5, 2016

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1556602384662406/int_phab to review.

Before this commit the websocket proxy treated every connection
the same way, which sometimes resulted in bugs like having 2 debuggers
connected, etc. Now it allows only 1 debugger and 1 client.
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@frantic updated the pull request.

@ghost ghost closed this in 64d56f3 Feb 5, 2016
@frantic frantic deleted the custom-dbg branch February 6, 2016 03:04
@aleclarson
Copy link
Copy Markdown
Contributor

Very nice! 😄

aleclarson added a commit to aleclarson/react-native that referenced this pull request Feb 9, 2016
Summary:
`debugger.html` contained a ton of hacky code that was needed to ensure we have a clean JS runtime every time a client RN app connects. That was needed because we used the page's global environment as runtime. Some time ago WebWorker support was added and now we run RN code inside an isolated WebWorker instance, and we can safely get rid of all these hacks.

This has a bunch of nice side-effects: debug reload works faster, `console.log`s are preserved, `debuggerWorker.js` selection doesn't change.

Made sure the debugging (breakpoints, etc.) still works as before.

Small demo
![](http://g.recordit.co/FPdVHLHPUW.gif)
Closes facebook#5715

Reviewed By: svcscm

Differential Revision: D2906602

Pulled By: frantic

fb-gh-sync-id: 1a6ab9a5655d7c32ddd23619564e59c377b53a35
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
Summary:
`debugger.html` contained a ton of hacky code that was needed to ensure we have a clean JS runtime every time a client RN app connects. That was needed because we used the page's global environment as runtime. Some time ago WebWorker support was added and now we run RN code inside an isolated WebWorker instance, and we can safely get rid of all these hacks.

This has a bunch of nice side-effects: debug reload works faster, `console.log`s are preserved, `debuggerWorker.js` selection doesn't change.

Made sure the debugging (breakpoints, etc.) still works as before.

Small demo
![](http://g.recordit.co/FPdVHLHPUW.gif)
Closes facebook/react-native#5715

Reviewed By: svcscm

Differential Revision: D2906602

Pulled By: frantic

fb-gh-sync-id: 1a6ab9a5655d7c32ddd23619564e59c377b53a35
TL-Yao pushed a commit to scantist-ossops-m2/nuclide that referenced this pull request Aug 7, 2024
* Add commands for debugging non-Buck React Native apps (requires [react-native#5717](facebook/react-native#5715))
* Add commands for running RN Packager without building via Buck
* Fixed “unknown call” warning in RN element inspector
* Added limit on Clang server memory usage
* Improvements to datatip UX: Datatips disappear on keydown, and the default delay is now 200ms and can be configured in settings (Packages > Nuclide > Nuclide-datatip > debounce delay). Also improved the mapping of mouse coordinates to code.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants