Last active
February 7, 2019 10:36
-
-
Save dchowitz/745b93c408c071dcad0f486594b11fbe to your computer and use it in GitHub Desktop.
Revisions
-
dchowitz revised this gist
Feb 7, 2019 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,8 +15,7 @@ enableDebug("*"); // this enables all debug output, look in the debug documentat After that you will see your debug output and that of your dependencies by running ```bash react-native log-android # resp. react-native log-ios ``` in a terminal. -
dchowitz revised this gist
Feb 7, 2019 . 1 changed file with 16 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,22 @@ Lots of dependencies rely on the [debug](https://github.com/visionmedia/debug) module for debug output. When debugging a React Native app with Chrome Developer tools, you can enable the debug output with ```js window.localStorage.debug = 'namespace' ``` in the console. However, sometimes you need the debug output without running your app in Chrome's V8 context due to some subtle differences between the Javascript execution engines. In order to achieve this, you can simply add `enableDebug.js` to your project and import it in your `index.js` like this: ```js import enableDebug from "./enableDebug"; enableDebug("*"); // this enables all debug output, look in the debug documentation for configuration options ``` After that you will see your debug output and that of your dependencies by running ```bash react-native log-android ``` resp. ```bash react-native log-ios ``` -
dchowitz revised this gist
Feb 7, 2019 . 2 changed files with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ export default function(namespaces) { if (!window.localStorage) { window.localStorage = { removeItem: function() {} }; } window.localStorage.debug = namespaces; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,4 @@ window.localStorage.debug = 'namespace' ``` in the console. However, sometimes you need the debug output without running your app in Chrome's V8 context due to some subtle differences between the Javascript execution engines. -
dchowitz created this gist
Feb 7, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Lots of dependencies use the [debug](https://github.com/visionmedia/debug) for debug output. When debugging a React Native app with Chrome Developer tools, you can enable the debug output with ```js window.localStorage.debug = 'namespace' ``` in the console. However, sometimes you need the debug output without running your app in Chrome's V8 context due to some subtle differences