{
"name": "Debug iOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"runArguments": [
"--project-path", "./examples/ios",
],
},
'iosRelativeProjectPath' option is deprecated. Please use 'runArguments' instead."
i used runArguments, but could not _debug
this.iosProjectRoot = path.join(this.projectPath, this.runOptions.iosRelativeProjectPath || IOSPlatform.DEFAULT_IOS_PROJECT_RELATIVE_PATH);
should update project-path
Hi @Darkhorse-Fraternity and thanks for reaching us. Could you please try to run the following command in your terminal from the project folder and let us know how it works for you?
react-native run-ios --project-path ./examples/ios
Hi @Darkhorse-Fraternity . Do you have a chance to look at this?
react-native run-ios --project-path ./examples/ios
info Found Xcode workspace "ZXTTRNTest.xcworkspace"
info Launching iPhone X (iOS 12.4)
@Darkhorse-Fraternity Could you please describe how this command works for you? Does it launch application?
Hi @Darkhorse-Fraternity . Do you have a chance to look at this?
This order is ok. The problem appears in the source code, this.iosProjectRoot = path.join(this.projectPath, this.runOptions.iosRelativeProjectPath || IOSPlatform.DEFAULT_IOS_PROJECT_RELATIVE_PATH),
iosProjectRoot has been deprecated and not recognized --project-path
{
"name": "Debug iOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"runArguments": [
"--project-path", "./examples/ios",
],
"iosRelativeProjectPath": "examples/ios"
}
iosProjectRoot is not recognized --project-path ,and iosRelativeProjectPath was Deprecated
@Darkhorse-Fraternity Could you please fill all the information as noted in our issue template?
Actual Behavior
{
"name": "Debug iOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"runArguments": [
"--project-path", "./examples/ios",
],
"iosRelativeProjectPath": "examples/ios"
}
run:
Error: Could not find Xcode project files in "x x x x/RN/ZXTT-RN/ios" folder
Expected Behavior
success Successfully launched the app on the simulator
Software versions
System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 66.12 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.8.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.10.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 23, 27, 28, 29
Build Tools: 28.0.3, 29.0.0, 29.0.2
Android NDK: 20.0.5594570
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.1 => 0.61.1
npmGlobalPackages:
react-native-cli: 2.0.
Outputs (Include if relevant)
[Error] Error: Could not find Xcode project files in "/Users/tonyyo/Documents/Project/RN/ZXTT-RN/ios" folder
Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
run ok
@Darkhorse-Fraternity Could you please try to install patched extension VSIX from fix-ios-project-path-arg branch? To do that please do the following:
Extensions (at this point all the extensions marked for deletion are deleted and you can install a new version)...Install from VSIX... and select downloaded VSIX{
"name": "Debug iOS",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"runArguments": [
"--project-path", "./examples/ios",
],
"iosRelativeProjectPath": "examples/ios"
},
to used vscode-react-native-0.12.1.vsix.zip
OS: darwin x64
Adapter node: v10.11.0 x64
vscode-chrome-debug-core: 6.8.2
Unable to debug。Invalid Version:
By the way, see if the android needs to be modified. android use --root
{
"name": "Debug Android",
"cwd": "${workspaceFolder}",
"type": "reactnative",
"request": "launch",
"platform": "android",
"runArguments": [
"--root", "./examples/"
],
},
}
@Darkhorse-Fraternity Could you please provide configured minimal demo application where Android and iOS native projects placed not in the project root and the arguments listed above (--root and --project-path) allows to build an application?
@SounD120 . see https://github.com/Darkhorse-Fraternity/RNPakageForNative
iOS: cd ./examples/ios && pod install --verbose && cd ../../ && eact-native run-ios --project-path ./examples/ios
Android:react-native run-android --root './examples/' --variant debug