I read some old questions about Live Edit in Safari. There was an option to set a breakpoint, double click on the line and edit the code. I am double clicking the code right now, but no luck. How can I edit the javascript code before it gets executed in Safari? Through extensions or in some other way?
Asked
Active
Viewed 1,045 times
3
-
Did you check this [answer](http://stackoverflow.com/a/9787209/2873538)? – Ajeet Shah May 18 '16 at 08:54
-
Correct me if I'm wrong, but console is only great for global variables. What can you do about variables defined in a specific scope? – Herr May 18 '16 at 09:31
-
You are right. But you can access local variables if you put breakpoints in their scope. – Ajeet Shah May 18 '16 at 10:10
1 Answers
0
In safari, it is not possible to edit the javascript code as you do in other browsers (e.g. chrome). But you can modify the variable values using Developer Tools in safari (to open: ATL+CTRL+C
or Command+Option+C
on Mac). All you need to do is apply breakpoints at appropriate lines and modify the variables using console in Developer Tools.

Ajeet Shah
- 18,551
- 8
- 57
- 87