I am very new to ExtJS and still going through the Docs in Sencha site. I've seen a lot of examples in ExtJS4 using console.log() for debugging. However I couldn't figure out how to deal with console.log().
我对ExtJS非常熟悉,还在Sencha网站上浏览文档。我在ExtJS4中看到了许多使用console.log()进行调试的例子。但是我不知道如何处理console.log()。
I am using Aptana Studio 3 for development, and I don't think Aptana can run console.log() (correct me if im wrong). So we need to debug it in Firebug? Then how to incorporate script files like ext-all.js, ext-debug.js into Firebug?
我正在使用Aptana Studio 3进行开发,我不认为Aptana可以运行console.log()(如果我错了,请纠正我)。所以我们需要在Firebug中调试它?然后如何合并脚本文件,如ext-all。js, ext-debug.js into Firebug?
2 个解决方案
#1
5
Right, the console.log()
output from your scripts goes to the console window of the developer tools of whatever browser you're using (e.g. Firebug for Firefox). The browser developer tool picks up the script files from the same place the browser does; i.e. however you have them loaded into your web page.
从您的脚本中输出的console.log()输出到您正在使用的任何浏览器的开发工具的控制台窗口(例如Firefox的Firebug)。浏览器开发工具从浏览器所做的地方获取脚本文件;也就是说,你将它们载入你的网页。
#2
1
I would recommend you to use Google chrome. It has a very good developer tool. Apart from that for ExtJs, use ext-all-dev.js file instead of ext-all.js or ext-all-debug.js while doing any development. It will be really helpful. Check this link for more details.
我建议你使用谷歌chrome。它有一个非常好的开发工具。除了ExtJs之外,使用ext-all-dev。js文件而不是ext-all。js或ext-all-debug。在做任何开发的时候。这真的很有帮助。查看此链接了解更多细节。
Also you can set breakpoints by simply using the command debugger;
in your javascript file. But to make this work make sure firebug/developer tool is running.
还可以通过简单地使用命令调试器设置断点;在你的javascript文件。但是要使这个工作确保firebug/developer工具正在运行。
Hope this helps.
希望这个有帮助。
#1
5
Right, the console.log()
output from your scripts goes to the console window of the developer tools of whatever browser you're using (e.g. Firebug for Firefox). The browser developer tool picks up the script files from the same place the browser does; i.e. however you have them loaded into your web page.
从您的脚本中输出的console.log()输出到您正在使用的任何浏览器的开发工具的控制台窗口(例如Firefox的Firebug)。浏览器开发工具从浏览器所做的地方获取脚本文件;也就是说,你将它们载入你的网页。
#2
1
I would recommend you to use Google chrome. It has a very good developer tool. Apart from that for ExtJs, use ext-all-dev.js file instead of ext-all.js or ext-all-debug.js while doing any development. It will be really helpful. Check this link for more details.
我建议你使用谷歌chrome。它有一个非常好的开发工具。除了ExtJs之外,使用ext-all-dev。js文件而不是ext-all。js或ext-all-debug。在做任何开发的时候。这真的很有帮助。查看此链接了解更多细节。
Also you can set breakpoints by simply using the command debugger;
in your javascript file. But to make this work make sure firebug/developer tool is running.
还可以通过简单地使用命令调试器设置断点;在你的javascript文件。但是要使这个工作确保firebug/developer工具正在运行。
Hope this helps.
希望这个有帮助。