调试ie9有两个ie进程_IE中用于调试的两个小书签

调试ie9有两个ie进程_IE中用于调试的两个小书签

调试ie9有两个ie进程

Here are two bookmarklets that could make your life easier when trying to figure out why in IE a page behave as wrong as it behaves. For Firefox we have Firebug, so none of this is necessary. For IE we have also Firebug lite (see my post), but you need some setup before you can use it. With this thing here you can mess up any page you see on the web, not only yours ????

这里有两个书签,可以让您在尝试弄清IE页面中的错误行为时的生活变得更轻松。 对于Firefox,我们有Firebug,因此这些都是不必要的。 对于IE,我们也提供Firebug lite ( 请参阅我的文章 ),但是您需要进行一些设置才能使用它。 使用此工具,您可以弄乱您在网络上看到的任何页面,而不仅仅是您的????

书签1-Eval()文本区域 (Bookmarklet 1 - Eval() textarea)

I saw this bookmarklet here and it's beautiful. When you start it, it puts a textarea at the bottom of your page and you can type javascript in it, then eval()-uate it. Perfect! Only ... it doesn't work in frames. So I did the same thing but when you have frames (works without frames as well). The way mine works is - you first select some text in a frame, then you click the bookmarklet. A new textarea, ready to execute javascript will be placed in this frame (or iframe) that you selected. Also in this case when you type document.something, it refers to the document in the frame, not the frameset. If you don't select any text and click the bookmarklet, it will place the textarea in the topmost document, so it will work for frame-free pages as well.

我在这里看到了这个小书签 ,它很漂亮。 启动它时,它将在页面底部放置一个文本区域,您可以在其中键入javascript,然后使用eval()创建它。 完善! 仅...在框架中不起作用。 所以我做了同样的事情,但是当你有框架的时候(也没有框架也可以)。 我的工作方式是-首先选择框架中的一些文本,然后单击书签。 准备执行JavaScript的新textarea将放置在您选择的此框架(或iframe)中。 同样在这种情况下,当您键入document.something ,它引用框架中的文档,而不是框架集。 如果您没有选择任何文本,然后单击小书签,则它将文本区域放置在最上方的文档中,因此也适用于无框架页面。

So here's the bookmarklet.

这是小书签。

textarea eval 文本区域评估

And here's a page where you can test.

这是您可以测试的页面。

书签2-丢弃任何内容 (Bookmarklet 2 - dump anything)

After having my beautiful textarea, I wanted to be able to dump variables, like print_r() or var_dump() but for Javascript. I googled and I found this little script. All I did then is to make it a bookmarklet. How it works? You select the bookmarklet, it gives you a prompt, where you type whatever you want to dump, like document.location for example. Then it shows you an alert with all properties of this thing you typed. (Don't try to dump document though, or something else that recurses, because the script won't handle the recursion and will freeze).

在拥有漂亮的textarea之后,我希望能够转储变量,例如print_r()var_dump(),但适用于Javascript。 我搜索了一下,发现了这个小脚本 。 然后,我要做的就是使其成为书签。 怎么运行的? 选择小书签,它会提示您输入任何要转储的内容,例如document.location 。 然后,它会向您显示一个警报,其中包含您键入的内容的所有属性。 (但是,请勿尝试转储document或其他会递归的文件,因为脚本将无法处理递归并会冻结)。

Install it from here:

从这里安装:

dump var 转储变量

While this second bookmarklet will most likely work in FF as well, you don't need it, you have firebug!

尽管第二个小书签也很可能也可以在FF中使用,但您不需要它,您有萤火虫!

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/two-bookmarklets-for-debugging-in-ie/

调试ie9有两个ie进程