Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editing Javascript using Chrome Developer Tools

I am trying to edit javascript on a site using Chrome's Developer Tools. I have read about 30 accounts of how to do this as well as watched a few videos. The fact is, when I go to the sources tab and open the file I want to edit, I can't do anything to it. Is there some step I am missing?

I can create break points, step through, etc... I just can't edit. Was this functionality removed recently?

like image 634
cooperia Avatar asked Sep 26 '12 00:09

cooperia


People also ask

How do I edit and run JavaScript in Chrome?

Editing JavaScript code in real-time is possible in Chrome and Chromium based browsers. After loading a web page completely, press the F12 key to open the developer tools, then open the 'Sources' tab. Now open any Javascript file loaded on the browser and you can directly edit it by clicking anywhere in that file.

How do I edit JavaScript in IE developer tools?

Our first experiment in the latest build allows you to edit any JavaScript file in the debugger source viewer. Enable the “Edit JavaScript” toggle and restart your browser. Once the feature is enabled, simply click on the Debugger's source viewer to place the cursor and start modifying your JavaScript!


1 Answers

I know this question is stale, but I just had a similar problem and found the solution.

If you have the file prettified, Chrome will not allow edits. I turned it off and was able to edit. Willing to bet this is/was your problem.

like image 103
raddevon Avatar answered Oct 07 '22 19:10

raddevon