AOL桌面浏览器控制台? [英] Browser Console for AOL Desktop?

查看:363
本文介绍了AOL桌面浏览器控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我参与了通过 w << href =http://support.microsoft.com/kb/2835600 =nofollow noreferrer> Update3 ,但有一个例外:即时调试选项显示为不存在这不是一个显示屏,尽管如此,仍然可以附加到运行的AOL进程,并以相同的方式调试当前加载的页面。



PS。并感谢您在不相关的我的问题,这是一个非常好的姿态。


I participate in development of a site that has a significant number of users who view our site through the AOL Desktop v9.7 for Windows - which spawns browser windows inside itself. When debugging, I don't have the tooling I would normally be able to invoke (for example Chrome's Developer Console; Firebug; MSIE's F12 developer tools).

When inside AOL Desktop, I don't appear to have any of these, or anything similar. Is there a developer mode or console I can invoke, unearth?

解决方案

What I meant in my comments, you could just use a very decent JavaScript debugger with manual DOM inspecting features, which comes with Visual Studio ([EDITED] including the free edition). With some tricks, it does work for AOL Desktop, too (what an amusing piece of software that is, BTW :) Of course, this is not the same as IE's F12 Tools, it lacks the interactive features like visual DOM tree, CSS tracing etc. But it still allows to step through the code, watch locals and objects, evaluate expressions and access DOM elements. It's an invaluable tool and I use it a lot for projects where we host the WebBrowser control. After all, that's what AOL does, too. Anyway, if you're already familiar with this, just give this post a smile and disregard it. Otherwise, read on :)


I tested the following under Win7 SP1 VM with IE9, Visual Studio 2012 Pro (Update3) and the latest AOL Desktop 9.7. [EDITED] It also works with the free edition, Visual Studio 2012 Express for Desktop, Update3.

The only major obstacle was that in about 20 seconds upon entering the debugger, AOL Browser used to restart itself, thus disconnecting from the debugger. A workaround for this was to close AOL and delete the following files:

"C:\Program Files (x86)\AOL Desktop 9.7\" 
    shellmon.exe
    shellmon.ini
    shellrestart.exe

Then, I used the following basic HTML file for debugging purpose (as "debug.html" in the root of localhost):

<!doctype html>
<html>
<head>
<title>Debugger Test Page</title>
<script>
function debugPrompt()
{
    if (confirm("debug?"))
    {
        debugger; // breakpoint
        alert("after debugger");
    }
}

document.onkeydown = function()
{
    if (event.altKey && event.ctrlKey && event.keyCode === 'D'.charCodeAt(0))
    {
        event.cancelBubble = true;
        debugPrompt();
        return;
    }
}
</script>
</head>
<body>
<button onclick="debugPrompt()">Debug</button>
</body>
</html>

Here's what I did exactly:

  • Made sure Script Debugging is enabled in IE settings for both Internet Explorer and Other:


  • Made sure [x] Script is checked in VS2012 Debugging Settings, Just-In-Time section ([EDITED] this feature is missing from VS2012 Express, but it isn't really important):


  • Ran AOL and navigated to localhost/debug.html.

  • Ran Visual Studio and attached to the aolbrowser.exe process (with Script as the target kind of code), via Debug/Attach to Process menu:


  • Went back to AOL and hit Ctrl-Alt-D (invokes the "debugger" prompt in my JavaScript listed above). The next thing, I'm in the VS Debugger right at the debugger; line of code. At this point, all usual debugging features are available. Note the Immediate Window panel and the Watch1 panel. Also, instead of hard-coding breakpoints with debugger keyword as I did, it's possible to use Visual Studio Solution panel (once the debugger has been attached) to select one of the JavaScript files loaded by the page and toggle breakpoints interactively.


Right now, I don't have Visual Studio Express 2012 to verify if the same is possible with it, although I assume it should be. I'll give it a try a bit later.

[UPDATE] Almost all of the above applies to the freely available Visual Studio 2012 Express for Desktop w/ Update3, with one exception: Just-In-Time Debugging option appears to be absent. This is not a show-stopper though, as it is still possible to attach to the running AOL process and debug the currently loaded page the same way.

PS. And thank you for your voluntary bounty offer on an unrelated question of mine, that is a really nice gesture.

这篇关于AOL桌面浏览器控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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