Inspecting javascript on jsfiddle.net in Google Chrome

JavascriptGoogle ChromeJsfiddleGoogle Chrome-Devtools

Javascript Problem Overview


Is it possible to set breakpoints using the google chrome inspector on javascript code entered into jsfiddle.net?

When I go to the script tab of the developer tools I see lots of scripts but I don't know where my script would be found or if it can be found in there at all. In the past I have just settled for some console.log action but I would love to set some breakpoints.

(If not possible I am interested in other ways of inspecting javascript in this scenario.)

Javascript Solutions


Solution 1 - Javascript

Debugger calls work fine on jsfiddle. Just enter this line where you want to start debugging:

debugger;

Debugger is great for starting debug mode in chrome, firebug and even IE dev tools, but you usually need to have the debugger started (ie "start debugging" in IE, open firebug/developer tools).

Solution 2 - Javascript

In the Developer Tools, under the Script tab if you select fiddle.jshell.net from the dropdown, around line 20-30 (depending on how much CSS you have) you will see a <script> tag that contains the code from the Javascript fiddle window. You can set your breakpoints here.

You can also evaluate code in the Console against this frame by changing the console context:

Solution 3 - Javascript

Another trick is to show your fiddle without the editor using the following syntax:

<normal path to your fiddle>/show/light/

as an example: jsfiddle-link

Solution 4 - Javascript

From the developer console go to tab sources, open the sources tree representation (on the left), open the fiddle.jsshell.net node, next click _display, next (index) and you should see your code.

Note that if you save your code this _display reference will be replaced by fiddle-reference/version/show. For example JsQfE/2/show (which doesn't exist as far as I know but does the job as an example).

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLeRoyView Question on Stackoverflow
Solution 1 - JavascriptEffataView Answer on Stackoverflow
Solution 2 - JavascriptmVChrView Answer on Stackoverflow
Solution 3 - JavascriptdbrinView Answer on Stackoverflow
Solution 4 - JavascripthcplView Answer on Stackoverflow