Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug the js in jsfiddle

I am looking at this jsfiddle: http://jsfiddle.net/carpasse/mcVfK/ It works fine that is not the problem , I just want to know how to debug through the javascript. I tried to use the debugger command and I cant find it in the sources tab? any idea how I can debug this?

some code from the fiddle:

angular.module('app', ['appServices'])     .config(['$routeProvider', function($routeProvider) {         $routeProvider.                 when('/home', {templateUrl: 'home.html',   controller: HomeCtrl}).                 when('/list', {templateUrl: 'list.html',   controller: ListCtrl}).                 when('/detail/:itemId', {templateUrl: 'detail.html',   controller: DetailCtrl}).                 when('/settings', {templateUrl: 'settings.html',   controller: SettingsCtrl}).                 otherwise({redirectTo: '/home'}); }]); 
like image 315
Pindakaas Avatar asked Oct 18 '13 22:10

Pindakaas


People also ask

Can you debug in JSFiddle?

JSFiddle (all browsers)Being able to debug JavaScript often means reducing an error to it's most basic components. JSFiddle is a great way to do so, and then communicate this to other collaborators. You can signup to link fiddles your profile.

Can we debug JavaScript?

But fortunately, all modern browsers have a built-in JavaScript debugger. Built-in debuggers can be turned on and off, forcing errors to be reported to the user. With a debugger, you can also set breakpoints (places where code execution can be stopped), and examine variables while the code is executing.

Can you debug JavaScript in Visual Studio code?

The Visual Studio Code editor supports debugging of JavaScript running in Microsoft Edge and Google Chrome. You can read more about debugging browsers works in the Browser Debugging documentation.


1 Answers

The JavaScript is executed from the fiddle.jshell.net folder of the Sources tab of Chrome. You can add breakpoints to the index file shown in the Chrome screenshot below.

Debugging JSFiddle in Chrome

enter image description here

like image 53
apandit Avatar answered Sep 18 '22 06:09

apandit