debugging - How to debug embedded JavaScript in Safari - Stack Overflow

EDIT: Updated title to change 'inline' to 'embedded' to better reflect the nature o

EDIT: Updated title to change 'inline' to 'embedded' to better reflect the nature of the question, per @dmi3y's suggestion.

In Chrome I monly debug JS by setting breakpoints in my JS files, but Chrome also allows you to do this with the actual Document in the case that there's inline JS (i.e. JS that isn't in a separate .js file, but rather is in a <script> tag). I can't, for the life of me, find the same functionality in Safari. Does it exist, or am I out of luck?

Apologies if this question has already been asked...I checked the search and only found this (somewhat, but not really) related question: How to debug lazily-loaded javascripts in Safari debugger

EDIT: Updated title to change 'inline' to 'embedded' to better reflect the nature of the question, per @dmi3y's suggestion.

In Chrome I monly debug JS by setting breakpoints in my JS files, but Chrome also allows you to do this with the actual Document in the case that there's inline JS (i.e. JS that isn't in a separate .js file, but rather is in a <script> tag). I can't, for the life of me, find the same functionality in Safari. Does it exist, or am I out of luck?

Apologies if this question has already been asked...I checked the search and only found this (somewhat, but not really) related question: How to debug lazily-loaded javascripts in Safari debugger

Share Improve this question edited May 23, 2017 at 12:06 CommunityBot 11 silver badge asked Dec 5, 2012 at 0:14 brandwafflebrandwaffle 1,2629 silver badges11 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

You can do it (at least in 5.1.7 version for Windows), just go to the Scripts tab and select something like http://yoursite./ it shows the similar picture as Elements do, but you obviously could debug embedded JS there.

PS: by the way around the terminology, I usually think about inline script for something like

<a ... onclick="myfunction();" />

or

<a ... href="javascript:myfunction();" />

that stuff might be used for bookmarklets or small calls.

code into script tag I use to call like embedded

it wold be interested if debugger could actually do work with inlined script?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745141875a4613467.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信