-
Notifications
You must be signed in to change notification settings - Fork 25k
Making console write to the Safari debugger console as well as NSLog #205
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
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Any thoughts on this? @vjeux |
|
I don't think it is necessary to send it to Safari debugger. It will make it complicated, when Windows support is released. I think it can send to the development server, which will somehow keep consistency among different platforms. |
|
@tjwudi the diff is just calling the native console and would be simple to skip calling the native console's if it's not defined. The idea is that Web Inspector (Safari or Chrome's) are useful as REPLs and it's helpful to see all the console output in one place. |
wrong javascript in example
Fixed typo in tutorial
Fix broken link
|
I'm going to resubmit this pull request because: |
Ex. When `console.log` or similar is called, this will call the original method, which can be quite useful. For example, under iOS, this will log to the Safari console debugger, which has an expandable UI for inspecting objects, etc., and is also just useful if you are using that as a REPL. I don't believe this incurs a meaningful performance penalty unless the console is open, but it would be easy to stick behind a flag if that is a problem. A slightly different version of this patch was submitted a while ago and merged but something got screwed up with the merge and this change was not actually pulled in. (See the weird unrelated commits and changes attached to the PR facebook#205)
Ex. When `console.log` or similar is called, this will call the original method, which can be quite useful. For example, under iOS, this will log to the Safari console debugger, which has an expandable UI for inspecting objects, etc., and is also just useful if you are using that as a REPL. I don't believe this incurs a meaningful performance penalty unless the console is open, but it would be easy to stick behind a flag if that is a problem. A slightly different version of this patch was submitted a while ago and merged but something got screwed up with the merge and this change was not actually pulled in. (See the weird unrelated commits and changes attached to the PR facebook#205)
Ex. When `console.log` or similar is called, this will call the original method, which can be quite useful. For example, under iOS, this will log to the Safari console debugger, which has an expandable UI for inspecting objects, etc., and is also just useful if you are using that as a REPL. I don't believe this incurs a meaningful performance penalty unless the console is open, but it would be easy to stick behind a flag if that is a problem. A slightly different version of this patch was submitted a while ago and merged but something got screwed up with the merge and this change was not actually pulled in. (See the weird unrelated commits and changes attached to the PR facebook#205)
Ex. When `console.log` or similar is called, this will call the original method, which can be quite useful. For example, under iOS, this will log to the Safari console debugger, which has an expandable UI for inspecting objects, etc., and is also just useful if you are using that as a REPL. I don't believe this incurs a meaningful performance penalty unless the console is open, but it would be easy to stick behind a flag if that is a problem. A slightly different version of this patch was submitted a while ago and merged but something got screwed up with the merge and this change was not actually pulled in. (See the weird unrelated commits and changes attached to the PR facebook#205)
Ex. When `console.log` or similar is called, this will call the original method, which can be quite useful. For example, under iOS, this will log to the Safari console debugger, which has an expandable UI for inspecting objects, etc., and is also just useful if you are using that as a REPL. I don't believe this incurs a meaningful performance penalty unless the console is open, but it would be easy to stick behind a flag if that is a problem. A slightly different version of this patch was submitted a while ago and merged but something got screwed up with the merge and this change was not actually pulled in. (See the weird unrelated commits and changes attached to the PR facebook#205)
Summary: **Summary** This PR introduces validation for the new `metro-config`. For now I'm keen on only validating new config, because I can see there's yet unused `convertConfig` which, I guess, defeats the purpose. Let me know otherwise. This is still work in progress, as I need to fix some stuff upstream (e.g. recursive object validation and pretty-printing). Just letting you know I'm working on it :) **Test plan** Added a test. cc CompuIves cpojer Pull Request resolved: facebook/metro#205 Differential Revision: D14501222 Pulled By: cpojer fbshipit-source-id: 0ab8f3ad14d6f33690d5f57fd1e7487f3a4a8c71
Summary: Changelog: [Internal] - Update `react-native/debugger-frontend` from 8b84a77...8cce390 Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](facebook/react-native-devtools-frontend@8b84a77...8cce390). ### Changelog | Commit | Author | Date/Time | Subject | | ------ | ------ | --------- | ------- | | [8cce39003](facebook/react-native-devtools-frontend@8cce39003) | Alex Hunt ([email protected]) | 2025-09-25T15:05:50+01:00 | [Update Welcome panel assets and styling (facebook#208)](facebook/react-native-devtools-frontend@8cce39003) | | [7724ccb99](facebook/react-native-devtools-frontend@7724ccb99) | Alex Hunt ([email protected]) | 2025-09-25T08:46:01+01:00 | [Disable Perf Insights subpanel, collapse sidebar by default (facebook#209)](facebook/react-native-devtools-frontend@7724ccb99) | | [538c309a3](facebook/react-native-devtools-frontend@538c309a3) | Vitali Zaidman ([email protected]) | 2025-09-18T12:20:22+01:00 | [track when all startup resources are loaded (facebook#205)](facebook/react-native-devtools-frontend@538c309a3) | Reviewed By: hoxyq Differential Revision: D83248877
Summary: Pull Request resolved: facebook#53941 Changelog: [Internal] - Update `react-native/debugger-frontend` from 8b84a77...8cce390 Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](facebook/react-native-devtools-frontend@8b84a77...8cce390). ### Changelog | Commit | Author | Date/Time | Subject | | ------ | ------ | --------- | ------- | | [8cce39003](facebook/react-native-devtools-frontend@8cce39003) | Alex Hunt ([email protected]) | 2025-09-25T15:05:50+01:00 | [Update Welcome panel assets and styling (facebook#208)](facebook/react-native-devtools-frontend@8cce39003) | | [7724ccb99](facebook/react-native-devtools-frontend@7724ccb99) | Alex Hunt ([email protected]) | 2025-09-25T08:46:01+01:00 | [Disable Perf Insights subpanel, collapse sidebar by default (facebook#209)](facebook/react-native-devtools-frontend@7724ccb99) | | [538c309a3](facebook/react-native-devtools-frontend@538c309a3) | Vitali Zaidman ([email protected]) | 2025-09-18T12:20:22+01:00 | [track when all startup resources are loaded (facebook#205)](facebook/react-native-devtools-frontend@538c309a3) | Reviewed By: hoxyq Differential Revision: D83248877
Summary: Pull Request resolved: #53941 Changelog: [Internal] - Update `react-native/debugger-frontend` from 8b84a77...8cce390 Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](facebook/react-native-devtools-frontend@8b84a77...8cce390). ### Changelog | Commit | Author | Date/Time | Subject | | ------ | ------ | --------- | ------- | | [8cce39003](facebook/react-native-devtools-frontend@8cce39003) | Alex Hunt ([email protected]) | 2025-09-25T15:05:50+01:00 | [Update Welcome panel assets and styling (#208)](facebook/react-native-devtools-frontend@8cce39003) | | [7724ccb99](facebook/react-native-devtools-frontend@7724ccb99) | Alex Hunt ([email protected]) | 2025-09-25T08:46:01+01:00 | [Disable Perf Insights subpanel, collapse sidebar by default (#209)](facebook/react-native-devtools-frontend@7724ccb99) | | [538c309a3](facebook/react-native-devtools-frontend@538c309a3) | Vitali Zaidman ([email protected]) | 2025-09-18T12:20:22+01:00 | [track when all startup resources are loaded (#205)](facebook/react-native-devtools-frontend@538c309a3) | Reviewed By: hoxyq Differential Revision: D83248877 fbshipit-source-id: e5d7fb009a89bd97c8aac5f0a09b5733b8249651
We still write to NSLog or similar as well
There may be some performance penalty but I don't think so unless the REPL
window is open. It would not be hard to add a flag to this if necessary.
This will definitely make debugging and development easier.