最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - safari developer tools How do I watch expressions from iframe? - Stack Overflow

programmeradmin1浏览0评论

I have some content to debug in an iframe.

I cant seem to get Safari developer tool to recognize any scripts in an iframe. Let's say I want to Watch Expressions in the iframe. I add a variable to "Watched Expressions" from the iframe in the scripts tab of Safari Developer tools - yet the values always show up as 'Error'

Using Safari Developer Tools - How do I get the Watched Expressions to work for variables an iframe?

I have some content to debug in an iframe.

I cant seem to get Safari developer tool to recognize any scripts in an iframe. Let's say I want to Watch Expressions in the iframe. I add a variable to "Watched Expressions" from the iframe in the scripts tab of Safari Developer tools - yet the values always show up as 'Error'

Using Safari Developer Tools - How do I get the Watched Expressions to work for variables an iframe?

Share Improve this question edited Jun 10, 2016 at 15:09 meetar 7,6118 gold badges43 silver badges74 bronze badges asked Jun 9, 2013 at 23:44 user1502852user1502852
Add a ment  | 

5 Answers 5

Reset to default 1

Which version of Safari are you using? I am using its 6.0.4th version. Well even I could not find the option to add watch expressions but at the bottom of the debugging window there is one more down arrow icon near continue script execution icon. Clicking on the icon you will get one console and you can see the value of the expressions you are interested in. Hope this helps you a bit.

Click on the icon in the top right corner of the debugger window (The icon next to "{}" "T" "C"). "Scope Chain" should be selected.

It's March 2015 and the add watch expression feature is not yet present in Safari. Use Google Chrome instead.

Go to Safari -> Develop -> Select the device -> Web inspector will get opens

In the menu tabs close the debugger tab and again open it.

It worked for me, but didn't make any sense.

Open the dev tools

Go to the debugger (to see your source code/js)

Open the details sidebar (right sidebar) / cmd + alt + 0

In the details sidebar:

  • choose Scope chain

  • click the + to add a watch

  • write the name of your watch

Done!

发布评论

评论列表(0)

  1. 暂无评论