admin管理员组文章数量:1389768
I am building a Safari iOS (v15) extension, using HTML, CSS, and Javascript, in the XCode IDE. But, where are the console logs located?
When the extension UI is running on an iOS device simulator then it is very hard to find the root cause without seeing the console log.
I am building a Safari iOS (v15) extension, using HTML, CSS, and Javascript, in the XCode IDE. But, where are the console logs located?
When the extension UI is running on an iOS device simulator then it is very hard to find the root cause without seeing the console log.
Share Improve this question asked Oct 8, 2021 at 7:31 Veeresh DevireddyVeeresh Devireddy 1,1451 gold badge12 silver badges24 bronze badges2 Answers
Reset to default 4If you are trying to see the logs of console.log("some message") they are indeed in the Develop
-> Show Web Inspector
menu in Safari. If you don't see Develop
you will have to enable it in Preferences -> Advanced.
In order to see the console.log
output of your extension's javascript, there are 2 things to note.
console.log messages in
content.js
will be logged to the console where you usually see log output.However, if you want to see the log output of your
background.js
script you will need to do this:Develop
->Web Extension Background Pages
, that will popup another console connected to your background.js.
For a more thorough explanation see my answer here: https://stackoverflow./a/70597271/348121
You can use Safari on macOS to debug the extension running in the Simulator.
- Enable Developer menu in Safari. (Safari - Preferences - Advanced tab - "Show Develop meny in menu bar") 2.In the Safari - Develop menu you'll be able to see what is running on your simulator(s) and select to debug it in Web Inspector.
本文标签: javascriptWhere are the Console Logs of Safari iOS Extension locatedStack Overflow
版权声明:本文标题:javascript - Where are the Console Logs of Safari iOS Extension located? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744596951a2614834.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论