相关疑难解决方法(0)

React Native的新手-在Visual Studio Code中进行调试?

我按照VSCode中的说明进行了调试

https://github.com/Microsoft/vscode-react-native

我将MBP2015的USB 6电缆与Nexus 6P相连,并启用了开发人员选项和USB调试功能,但是当我在VSC中选择调试Android时,我得到了

[Error] "Could not debug. Android project not found."
Run Code Online (Sandbox Code Playgroud)

我也附上了这张照片。

如果要在IOS模拟器上进行调试,请选择“在VSC中调试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'"
Run Code Online (Sandbox Code Playgroud)

我在这里很少看到有关类似问题的信息,但没有一个得到答复,或者不是像我一样的同一个问题。

如何使用断点调试尽可能简单的React Native应用程序,以便我可以跟踪代码在Visual Studio Code中的执行方式?

这是我的launch.json

{
    // Use IntelliSense to …
Run Code Online (Sandbox Code Playgroud)

debugging react-native visual-studio-code

5
推荐指数
4
解决办法
1万
查看次数