11

I have Google Chrome 13.0.782.220 on my Ubuntu 10.04 LTS (64-bit).

I try to edit a JavaScript code from an external JS file in the Chrome Developer Tools Scripts pane by double-clicking on the script area. No matter how fast I click, the only effect is to select a nearby word.

Does anybody have an idea why the edit mode isn't activated?

5
  • I don't think there is a Javascript edit mode in Webkit Inspector. At best, you could use breakpoints, and trace your output.
    – Nemo
    Commented Sep 15, 2011 at 12:30
  • As stated here (redirected from here it is possible.
    – Rajish
    Commented Sep 15, 2011 at 12:36
  • 1
    This comment states that "Unfortunately you cannot live-edit pretty-printed JS. Maybe that'll come later." Dated 16th May 2011, so its pretty recent
    – Nemo
    Commented Sep 15, 2011 at 12:39
  • Yes, it does work with pretty print off. Chrome is awesome
    – Nemo
    Commented Sep 15, 2011 at 12:40
  • @Capt.Nemo You hit the nail. Put it as the answer so I could award you with the bounty.
    – Rajish
    Commented Sep 18, 2011 at 19:28

3 Answers 3

22
+100

Chrome Webkit Inspector does not allow you to live-edit pretty printed Javascript. Click the pretty print button (Looks like { }) in the Scripts tab to disable pretty-print mode and edit it.

Source: Introduction To Chrome Developer Tools

0
3

It's a bug. You can simulate a solution by pasting the formatted code into the minified file.

3
  • 1
    feel free to tell me why you downvoted
    – wcr4
    Commented Apr 8, 2016 at 20:40
  • I tried that, chrome tab stack overflow crash. Lots of bugs there
    – John
    Commented Oct 3, 2022 at 17:20
  • I see this is a Feature request, and is now Archived (Jul 18, 2022) with the comment: Realistically not going to work on this anytime soon Commented Jul 6, 2023 at 12:38
2

You might have hit against the Same origin policy.

From Disabling cross-domain security check for AJAX development in Google Chrome :

Start Google Chrome from command line, Ubuntu/Linux:

chromium-browser --disable-web-security

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .