【发布时间】:2017-12-05 09:55:48
【问题描述】:
我正在尝试在 Mac 上的 VS Code 上为 react-native 设置调试环境。
这是 launch.json :
{
// 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",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react",
"target": "simulator"
},
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Attach to packager",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "attach",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug in Exponent",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "exponent",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
]
}
在调试时我收到错误 - 调试适配器进程意外终止。 还有一个错误。
我也在Github 上打开了一个问题,但还没有收到解决方案。
更新:为了回应 ShaneG 的回答,我正在添加项目方案和 info.plist 的屏幕截图
【问题讨论】:
-
这很奇怪,对于所有在 mac 上工作的 react-native 开发人员可能都经历过的主题,我没有收到任何评论/答案。
标签: android ios react-native visual-studio-code