35

Is there any way for Jsfiddle to output javascript errors, an exception, or anything? I have tried to google this, but nothing seems to be out there.

I need to place alert() s through out my javascript code, so i know approximately where a runtime error has occurred, and then guess what the problem is. Surely there is an output console or something where JSFiddle outputs any error?

Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225
  • 9
    Why don't you just look into your browser's JS error console? – CBroe Jun 24 '13 at 09:02
  • 3
    Use ctrl+shift+enter to get your code in it's own page. Then on the console you see everything. – AntouanK Jun 24 '13 at 09:09
  • i realise what a stupid question it was now :) – Oliver Watkins Jun 24 '13 at 09:30
  • 10
    I hardly understand why this question needs to be closed. What do you mean its localised? A lot of newbies would also be wondering why JSFiddle doesnt show any error messages? (Or am i the only stupid one) – Oliver Watkins Jun 27 '13 at 08:51
  • 3
    No Oliver, you are not the only 'stupid' one out there (I prefer to say ignorant since we are all lacking in knowledge about something.) As a brand spanking new web developer learning on my own I had this same question and the answer is exactly what I needed. So, unlikely to help any future visitors? Wrong. Geographic area? Wrong. "Extraordinarily narrow situation"? Doubtful. Someone could create a histogram of how many upvotes per question to see where this ranks and perhaps reconsider 'reopening' it. – CramerTV Apr 01 '14 at 00:06
  • IMHO, It's a big lack for JSFiddle not showing errors in a developer friendly manner. I'm there to test stuff in a "friendly" environment, online. Why would I need to use browsers error console? If I'd want to use my browser to test a small JS code I would do it AT the browsers console. – scaryguy Jan 15 '15 at 21:40

3 Answers3

34

Surely there is an output console or something where JSFiddle outputs any error?

jsfiddle is only executing the javascript code you have written. So the output is written where you usually expect it to: the console of your web browser. That's where you will see any potential errors with your code.

On Google Chrome, the console can be accessed from inside "developer tools". You will see jsfiddle errors there.

DiscDev
  • 38,652
  • 20
  • 117
  • 133
Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • My problem is that JSFiddle is throwing TypeErrors in the transpiler phase and I can't relate it back to where in my sample the error is. The errors are deep inside `typescript.js`, which is minified and unreadable, etc. – Charlie Reitzel Oct 12 '19 at 14:51
4

if you're using Google-Chrome, you can use Inspect element then look under console tab

UPDATE

Or just press F12... Also works in FireFox and IE by @Bondye

Þaw
  • 2,047
  • 4
  • 22
  • 39
1

JsFiddle is not at all different than Browser. It shows frame under the browser you are browsing in, so the issues that jsFiddle's frame has are the issues that the browser has. So you basically you should look into browser issues that are being shown.

You can check them right after saving your fiddle, following these steps:

1) Save your fiddle and you will get this kinda url e.g. http://jsfiddle.net/FIDDLE-AUTOGENERATED-ID/

2) Open this in a new tab appending /show in the url e.g. http://jsfiddle.net/FIDDLE-AUTOGENERATED-ID/show

3) Now you can use Inspect Element of Chrome or Firefox to check script errors in console Tab OR by clicking on Red Cross at bottom right

wakqasahmed
  • 2,059
  • 1
  • 18
  • 23