Skip to content

Commit

Permalink
Move DebugEnvironment helper to open source
Browse files Browse the repository at this point in the history
Summary:
This is an internal only module that we use to detect whether we are in async debugging mode.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D20879780

fbshipit-source-id: 5915f4e1c54a3fda0cf607c77f463120264fdbc4
  • Loading branch information
elicwhite authored and facebook-github-bot committed Apr 7, 2020
1 parent c4806fa commit 990dd86
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Libraries/Utilities/DebugEnvironment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/

'use strict';

export let isAsyncDebugging: boolean = false;

if (__DEV__) {
// These native interfaces don't exist in asynchronous debugging environments.
isAsyncDebugging =
!global.nativeExtensions &&
!global.nativeCallSyncHook &&
!global.RN$Bridgeless;
}

0 comments on commit 990dd86

Please sign in to comment.