使 Flex Builder 调试器开始侦听传入的调试会话连接
有没有办法让 Flex Builder 连接到运行 Flash Player 调试器的现有浏览器会话?我可以像这样连接到 FDB,但是使用 Builder,我需要单击“调试”并在加载 Flash 文件之前急于关闭新打开的浏览器窗口,然后返回到我要连接的会话并右键单击它以启动调试器。不幸的是,这不是很可靠,因为我不能总是击败窗口打开,需要多次尝试才能连接到我感兴趣的会话。如果我可以告诉 Builder“开始调试”,然后让它等待连接后,我现在可以平静地转到浏览器,右键单击,点击调试,提供 IP,瞧。这将使我能够检查测试人员计算机上运行的会话中难以复制的错误的变量。
Is there any way to get Flex Builder to connect to an existing browser session running Flash Player Debugger? I can connect to FDB like this, but with Builder I need to click Debug and rush to close the newly opened browser window before it loads the Flash file and then go back to the session I want to connect and right click it to start the debugger. Unfortunately this is not very reliable as I can't always beat the window opening, requiring several attempts before being able to connect to the session I am interested in. If I could just tell Builder 'Start debugging' and then have it wait for the connection, I could now calmly go over to the browser, right click, hit debug, provide the IP and voila. This would allow me to inspect variables on a hard to replicate bug on a session running on a tester's computer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如其他答案中提到的,您可以修改启动配置以引用任何不包含 SWF 的 URL;但我只是想补充一点,您还可以使用 URL“about:blank”,它的优点是(从 Flash Builder 4 开始)Flash Builder 甚至不需要打开浏览器页面 - 它只会开始侦听插座。
——Mike Morearty,Flash Builder 团队
As mentioned in the other answers, you can modify the launch configuration to refer to any URL that doesn't contain a SWF; but I just wanted to add that you can also use the URL "about:blank", which has the advantage that (as of Flash Builder 4) Flash Builder won't even bother opening a browser page -- it will just start listening on the socket.
-- Mike Morearty, Flash Builder team
如果您将调试会话的启动器配置为一个没有 Flash 影片的网页,FB 将只等待调试器播放器连接。为此:按工具栏中“调试”图标旁边的箭头,选择“其他”。取消选中启动区域的 URL 或路径中的“使用默认值”。输入一个不含调试影片的 URL。然后只需将此浏览器导航到调试影片实际所在的位置即可。
If you configure the launcher of your debug session to be a web page without a Flash movie on it, FB will just wait to for a debugger player to connect. To do this: press the arrow next to the Debug Icon in the toolbar, select "Other". Uncheck the "Use Default" in the URL or path to launch area. Put in a URL that doesn't have a debug movie in it. Then just navigate this browser to where the debug movie actually is.
首先要解决您最大的问题,您听说过 Flash Log 文件吗?这将使您无需实际使用调试器即可看到跟踪。请参阅此处的说明:
http:// /blog.flexexamples.com/2007/08/26/debugging-flex-applications-with-mmcfg-and-flashlogtxt/
现在作为一种更直接的方法...
这是黑客行为,可能还有另一种方法,但它确实解决了问题。
您是否考虑过更改发布设置?这将阻止当前 swf 的加载,然后您可能还有 15 秒左右的时间来转到您想要的窗口。
转到调试菜单(可能是左侧第五个图标),然后
转到调试配置。
取消选中“使用默认值”
将调试 URL 更改为不包含 swf 的 URL。
当您运行调试器时,它现在应该再等待几十秒,然后才会超时。
To address your biggest problem first, have you heard of the Flash Log file? This will let you see the traces without actually having to use the Debugger. See instructions here:
http://blog.flexexamples.com/2007/08/26/debugging-flex-applications-with-mmcfg-and-flashlogtxt/
Now as a more direct approach...
This is hackish and there is probably another way, but it does solve the problem.
Have you thought about changing your publish settings? This would prevent the current swf from loading, and then you could have an additional fifteen seconds or so to go to the window you'd like.
Go to the debug menu (probably the fifth icon from the left), and then
go to Debug Configurations.
Uncheck "Use defaults"
change the Debug URL to one which does not include the swf.
When you run the debugger, it should now wait for another couple dozen seconds before it times out.