我跟着調試中VSCode按React Native非常新 - 在Visual Studio代碼中調試?
https://github.com/Microsoft/vscode-react-native
我重視我的Nexus 6P與我MBP2015 USB電纜的指示,使開發人員選項和USB調試,但是當我在VSC選擇調試機器人,我得到這
[Error] "Could not debug. Android project not found."
我重視的這個畫面,太。
如果我想在iOS模擬器調試,我在VSC選擇Debug IOS但後來我得到這個和模擬器未啓動
[vscode-react-native] Prewarming bundle cache. This may take a while ...
[vscode-react-native] Building and running application.
[vscode-react-native] Executing command: react-native run-ios --simulator
Scanning 772 folders for symlinks in /Users/me/reactnativework/my-app/node_modules (4ms)
ENOENT: no such file or directory, uv_chdir
[Error] "Could not debug. Error while executing command 'react-native run-ios --simulator': Error while executing command 'react-native run-ios --simulator'"
我已經在這裏看到幾個帖子關於類似的問題,但沒有得到回答或是不是像我一樣的問題。
如何使用斷點調試最簡單的React Native應用程序,以便我可以按照Visual Studio代碼中的代碼執行方式進行操作?
這裏是我的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 Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"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"
}
]
}
嗨Ganesh神,這聽起來很複雜。 「開始外部包....」。 ??? – pixel