Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在VSCode中设置断点来调试React扩展? #40

Open
baoblackcoal opened this issue Apr 1, 2023 · 2 comments
Open

如何在VSCode中设置断点来调试React扩展? #40

baoblackcoal opened this issue Apr 1, 2023 · 2 comments

Comments

@baoblackcoal
Copy link

设置断点进行调试比使用Console.log更强大,是否有一种方法来实现它?我在谷歌进行了搜索,但都没有找到有用的信息。

@tjx666
Copy link
Owner

tjx666 commented Apr 1, 2023

首先 chrome 插件有很多脚本类型,ni 想调试的是?

  1. content script
  2. option, popop 页面
  3. background

再就是我不建议使用 vscode 来 debug chrome 插件,因为很多 chrome 的代码都是 chrome:// 协议托管的。建议直接用 chrome debug。

如果你想尝试,可以参考:https://github.com/microsoft/vscode-chrome-debug

@baoblackcoal
Copy link
Author

baoblackcoal commented Apr 3, 2023

主要是chrome debug 调试content , 断点打到content按钮的onClick函数,触发不了,popup和background是可以触发的。vscode-chrome-debug有尝试过,但也对于content按钮的onClick函数是不能触发。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants