Vscode-react-native: Getting error 101 when debugging iOS

Created on 24 Sep 2019  路  3Comments  路  Source: microsoft/vscode-react-native

Actual Behavior

Running my debug configuration for iOS doesn't work. I get the error:
Error while executing command 'react-native run-ios --scheme 'dev' --simulator='iPhone SE' --verbose --no-packager' (error code 101)

Expected Behavior

Debugging should work as normal

Software versions

  • React-Native VS Code extension version: 0.11.1
  • VSCode version: 1.38.1
  • OS platform and version: Darwin x64 18.7.0 (macOS Mojave Version 10.14.6)
  • NodeJS version: 10.11.0
  • React Native version: 0.57.8
  • Expo SDK version (include if relevant): Not using Expo

Launch configuration

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug iOS",
      "cwd": "${workspaceFolder}",
      "type": "reactnative",
      "request": "launch",
      "platform": "ios",
      "runArguments": ["--scheme 'dev'", "--simulator='iPhone SE'", "--verbose"]
    },
  ]
}

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
OS: darwin x64
Adapter node: v10.11.0 x64
vscode-chrome-debug-core: 6.7.46
Could not debug. Error while executing command 'react-native run-ios --scheme 'dev' --simulator='iPhone SE' --verbose --no-packager': Error while executing command 'react-native run-ios --scheme 'dev' --simulator='iPhone SE' --verbose --no-packager' (error code 101)
  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
[Info] Packager is already running.

[Info] Prewarming bundle cache. This may take a while ...

[Info] About to get: http://localhost:8081/index.bundle?platform=ios

 BUNDLE  [ios, dev] ./index.js 鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔鈻撯枔 100.0% (1/1), done.

::ffff:127.0.0.1 - - [24/Sep/2019:19:52:33 +0000] "GET /index.bundle?platform=ios HTTP/1.1" 200 8435064 "-" "-"
[Warning] The Bundle Cache was prewarmed.

[Info] Building and running application.

[Error] Error: Error while executing command 'react-native run-ios --scheme 'dev' --simulator='iPhone SE' --verbose --no-packager': Error while executing command 'react-native run-ios --scheme 'dev' --simulator='iPhone SE' --verbose --no-packager' (error code 101)
  • Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
*none*
resolved

Most helpful comment

Hi @kevinnguy and thanks for reaching us. It seems that there is a = symbol is missing in the scheme declaration of your arguments. Could you please try to add it so the first argument will look like --scheme=dev?
Also as seen from your debug configuration, you can use special debug configuration parameters instead of runArguments such as scheme and target.
Here is the example of the debug scenario after changes:

    {
      "name": "Debug iOS",
      "cwd": "${workspaceFolder}",
      "type": "reactnative",
      "request": "launch",
      "platform": "ios",
      "scheme": "dev",
      "target": "iPhone SE"
    }

Please let us know if that was helpful.

All 3 comments

Hi @kevinnguy and thanks for reaching us. It seems that there is a = symbol is missing in the scheme declaration of your arguments. Could you please try to add it so the first argument will look like --scheme=dev?
Also as seen from your debug configuration, you can use special debug configuration parameters instead of runArguments such as scheme and target.
Here is the example of the debug scenario after changes:

    {
      "name": "Debug iOS",
      "cwd": "${workspaceFolder}",
      "type": "reactnative",
      "request": "launch",
      "platform": "ios",
      "scheme": "dev",
      "target": "iPhone SE"
    }

Please let us know if that was helpful.

@SounD120 thanks so much, it was using the scheme and target params that fixed the issue.

harder than finding real solution for problem is readign fucking wrong solutions that stupids sent to this site

Was this page helpful?
0 / 5 - 0 ratings