EDIT: Updated title to change ‘inline’ to ’embedded’ to better reflect the nature of the question, per @dmi3y’s suggestion.
In Chrome I commonly 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
You can do it (at least in 5.1.7 version for Windows), just go to the
Scriptstab and select something likehttp://yoursite.com/it shows the similar picture asElementsdo, but you obviously could debug embedded JS there.PS: by the way around the terminology, I usually think about
inlinescript for something likeor
that stuff might be used for
bookmarkletsor small calls.code into
scripttag I use to call likeembeddedit wold be interested if debugger could actually do work with inlined script?