Vscode-react-native: [Bug] iOS debug settings replacing the target name by deviceId automatically

Created on 1 Oct 2020  ยท  3Comments  ยท  Source: microsoft/vscode-react-native

๐Ÿ› What is the bug? How can we reproduce it?

Since version 1.0.0 every time I run the app using the debug settings it's replacing the target device name by the device id.
It's problematic since in our project we commit these settings and the device id is unique for each developer/device.

Please put here any steps, code or any information that can help us
reproduce the error on our side so we can fix it:

  1. Create a debug settings for iOS
  2. Add a simulator target (e.g. "target":"iPhone 11")
  3. Run the debug settings
  4. Target will be replaced by the device id (a UUID).
  • Original settings format before run the debug:
{
  "name": "Debug iOS",
  "cwd": "${workspaceFolder}",
  "type": "reactnative",
  "request": "launch",
  "platform": "ios",
  "target": "iPhone 11",
  "sourceMaps": true
}
  • Current settings format after debug is executed:
{
  "name": "Debug iOS",
  "cwd": "${workspaceFolder}",
  "type": "reactnative",
  "request": "launch",
  "platform": "ios",
  "target": "6C5AD9B0-D9FD-450F-B668-3A358D529787",
  "sourceMaps": true
}

Expected behavior

What were you expecting to happen?

It's expected to the target does not change like in the versions prior 1.0.0.

Debug output

N/A


Debug Console


PASTE OUTPUT OF DEBUG CONSOLE (View -> Toggle Debug Console)


React Native output channel


PASTE OUTPUT OF REACT-NATIVE OUTPUT CHANNEL (View -> Toggle Output -> Select React-Native in ListBox)


Developer Tools console


PASTE OUTPUT OF DEVELOPER TOOLS CONSOLE (Help -> Toggle Developer Tools -> Select Console tab)

Environment

Please tell us about your system and your project:

  • npx react-native doctor or npx expo doctor if your project is using Expo:
Common
 โœ“ Node.js
 โœ“ yarn
 โœ“ Watchman - Used for watching changes in the filesystem when in development mode

Android
 โœ“ ANDROID_HOME
 โœ“ Android SDK - Required for building and installing your app on Android

iOS
 โœ“ Xcode - Required for building and installing your app on iOS
 โœ“ CocoaPods - Required for installing iOS dependencies
 โ— ios-deploy - Required for installing your app on a physical device with the CLI
  • envinfo:
  System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 1.29 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.4 - ~/.nvm/versions/node/v12.18.4/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v12.18.4/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 4.2.1 - /usr/bin/gcc
    Git: 2.25.0 - /usr/local/bin/git
  Servers:
    Apache: 2.4.41 - /usr/sbin/apachectl
  Virtualization:
    Docker: 19.03.13 - /usr/local/bin/docker
  SDKs:
    iOS SDK:
      Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Nano: 2.0.6 - /usr/bin/nano
    VSCode: 1.49.2 - /usr/local/bin/code
    Vim: 8.1 - /usr/bin/vim
    Xcode: 11.7/11E801a - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Java: 1.8.0_232 - /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac
    Perl: 5.18.4 - /usr/bin/perl
    PHP: 7.3.11 - /usr/bin/php
    Python: 2.7.17 - /usr/local/bin/python
    Ruby: 2.6.3 - ~/.rbenv/shims/ruby
  Databases:
    SQLite: 3.28.0 - /usr/bin/sqlite3
  Browsers:
    Chrome: 85.0.4183.121
    Firefox: 77.0.1
    Safari: 14.0
  • React Native Tools extension version: >=1.0.0
bug fix-in-master

All 3 comments

I've had this bug today, here's what happen to me:

  1. run the debugger, the app would be launched and the target in launch.json would be overwritten
  2. stop the debugger
  3. simulator still running
  4. run the debugger again. debugger wont start with an error "error No iOS devices connected."
  5. replacing the uuid with the device name would enable me to start debugging again.

Hi @3ace , @andreyleonardo , React Native Tools v1.1.0 with a fix for that just have been released.

thanks a lot @SounD120! ๐Ÿ™

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peterp picture peterp  ยท  4Comments

webda2l picture webda2l  ยท  3Comments

buddhamangler picture buddhamangler  ยท  5Comments

kevinnguy picture kevinnguy  ยท  3Comments

dimitarnestorov picture dimitarnestorov  ยท  4Comments