Could not debug. Unable to find plist file to configure debugging in react native?

Viewed 687

i have app in react native which is running fine with react-native run-ios but when i try to debug it shows "Could not debug. Unable to find plist file to configure debugging" error for debugger.

I am using extension react native tool for debugging. Debugging is working fine in android but getting issue on IOS.

Please suggest if more information is required to solve this issue?

Thank you for help

2 Answers

(Disclaimer: I got the same error in iOS. As is not clear in which OS are you having the problem, I will put my grain of sand here.)

In my particular case, it was caused because I removed localhost entry from NSAppTransportSecurity in Info.plist. This is required for development/debugging.

Here is how this section should look like:

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>localhost</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>

I found an similar request here... maybe this solve your issue: https://stackoverflow.com/a/63747767/1256697

So make sure, that

  1. the Debugger (Google-Chrome Browser at http://localhost:8081:debugger-ui or react-devtools) and is up and running
  2. You connect your device / simulator with the Debugger via Developer-Menu (on IOS Simulator it's ctrl + cmd + z, on hardware devices.. shake the device)
  3. Choose Debug JS Remotely

If that's not the solution, please provide more information how do you start the debugging-process, which IDE you use (like XCode, VSCode, IntelliJ...).

Related