简体   繁体   English

如何使用IE 11和Firefox 36调试StealJS?

[英]How to debug StealJS with IE 11 and Firefox 36?

I use the minor tag of StealJS to load my JS files and everything seems to work, but today I recognized that I'm simply unable to debug my code in IE 11 and Firefox 36. Until now I only used the new Opera based on Chrome/Blink, currently version 27, which works pretty well regarding debugging. 我使用StealJS次要标签加载了JS文件,并且一切似乎都可以正常运行,但是今天我意识到我无法在IE 11和Firefox 36中调试代码。到目前为止,我仅使用了基于Chrome的新Opera / Blink,当前版本27,在调试方面效果很好。 But: 但:

Firefox's built in dev tools don't show my JS files at all. Firefox的内置开发工具完全不显示我的JS文件。 They only show steal.js and directly afterwards a greyed out line called "evals" with two additionals lines of two JS libs I use and export in stealconfig.js. 它们仅显示steal.js,然后直接显示为灰色的行,称为“ evals”,其中包含我使用的两个JS库的附加行,并在stealconfig.js中导出。

Firefox's Firebug shows my files and I can set breakpoints, but there seems to be some errors, because if I set/unset the breakpoint there's a little animation shown which never finishes. Firefox的Firebug显示了我的文件,我可以设置断点,但是似乎有些错误,因为如果我设置/取消断点,就会显示一个动画,它永远不会完成。 If I reload the page the usual breakpoint icon, a red circle, is shown, so it looks like the breakpoint has been set successfully, but the code simply doesn't stop on the breakpoint. 如果我重新加载页面,则会显示通常的断点图标(红色圆圈),因此看来断点已成功设置,但代码并没有在断点处停止。 But it is run, because the functionality implemented at the break point is usable. 但是它可以运行,因为在断点处实现的功能是可用的。

In IE 11 my JS files are shown in the "dynamic scripts" tree and I can set breakpoints as well, but everytime I reload the current page the icon for the breakpoint changes and gets some defect triangle with a warning sign, just like the breakpoint won't work anymore or such. 在IE 11中,我的JS文件显示在“动态脚本”树中,我也可以设置断点,但是每次重新加载当前页面时,断点的图标都会更改,并会出现带有警告符号的缺陷三角形,就像断点一样不会再这样了。 And of course IE doesn't stop the code as well after I reload the page and if I open my JS file the breakpoint is not shown anymore, which at least works in Firefox's Firebug. 当然,在我重新加载页面后,IE也不会停止代码,并且如果我打开JS文件,将不再显示断点,至少在Firefox的Firebug中可以使用。

None of those problems happen in Opera/Chrome, I always see all my files, can set breakpoints and the code stops as expected. 这些问题都不会在Opera / Chrome中发生,我总是会看到所有文件,可以设置断点,并且代码会按预期停止。 Additionally all browsers show individual requests for my JS file, nothing is bundled into one big one or such, it's all independent files during development. 另外,所有浏览器都显示对我的JS文件的单独请求,没有任何东西捆绑成一个大文件,在开发过程中都是独立文件。

So is StealJS and how it loads files simply incompatible with the other browsers? 那么StealJS以及它如何加载文件与其他浏览器完全不兼容? Do they need to add support for how Steal handles file loading? 他们是否需要增加对Steal如何处理文件加载的支持? I used a former version of Steal with JavaScriptMVC and none of these problems occured with that version. 我在JavaScriptMVC上使用了Steal的旧版本,但该版本均未发生这些问题。

Looks like those are browser issues, so go and write bug reports. 看起来像是浏览器问题,所以去写bug报告。

https://github.com/stealjs/steal/issues/419#issuecomment-99059303 https://github.com/stealjs/steal/issues/419#issuecomment-99059303

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM