如何调试jsfiddle中的js [英] how to debug the js in jsfiddle

查看:25
本文介绍了如何调试jsfiddle中的js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在看这个 jsfiddle:http://jsfiddle.net/carpasse/mcVfK/它工作正常,这不是问题,我只想知道如何通过 javascript 进行调试.我尝试使用调试器命令,但在源选项卡中找不到它?知道如何调试吗?

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'});
}]);

推荐答案

JavaScript 从 Chrome 的 Sources 选项卡的 fiddle.jshell.net 文件夹中执行.您可以向下面 Chrome 屏幕截图中显示的索引文件添加断点.

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.

这篇关于如何调试jsfiddle中的js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆