npapi插件调试 [英] npapi plugin debugging

查看:129
本文介绍了npapi插件调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

调试npapi插件的最佳做法是什么?我目前正在nixysa的帮助下开发一个插件。我目前正在调试打印中间值到日志文件。有没有更好的方法?



- 谢谢

解决方案

,我可以开始暗示第一个更好的方法是使用 FireBreath 而不是nixysa,但这会是粗鲁的并可能会泄露我的偏见;-)然而,严肃的说,尼克西萨并没有错;我建议FireBreath只是基于它的优点,它可以在IE以及Windows上工作,并且有更多的错误修正和解决方法,以确保所有浏览器和平台上的所有功能都可以正常工作。



一般来说,有很多关于调试插件的建议(如将调试器附加到它们上) FireBreath wiki ,这一切都非常适用于任何NPAPI插件。



获取类似linux上的调试方法可能特别痛苦,所以在linux上我通常更倾向于使用日志框架,例如 log4cplus



<其他人可能会有更多的建议,但如果我们确切知道你的目标是哪个平台,这可能会有所帮助;例如,Chrome(我注意到问题上的标记)支持--plugin-startup-dialog选项,由于Chrome上插件的多进程特性,它在启动之前附加到插件上是无价的。 IE和Firefox都可以选择禁用OOP(out of process)插件,这使得连接更容易。


What is the best practice to debug a npapi plugin. I am currently developing a plugin with the help of nixysa. I currently debugging printing intermediate values to log file. Is there any better way ?

--Thanks

解决方案

Well, I could start out by implying that the first better way is to use FireBreath instead of nixysa, but that would be rude and might give away my bias ;-) Seriously, though, there is nothing wrong with nixysa; I recommend FireBreath simply on the merit that it works on IE as well on windows and has a lot more bugfixes and workarounds to make sure everything works on all browsers and platforms.

There are a lot of suggestions for debugging plugins in general (as in attaching debuggers to them) on the FireBreath wiki that all pretty well apply to any NPAPI plugin.

Getting debugging methods like that working on linux can be particularly a pain, so on linux I usually lean more towards using a logging framework such as log4cplus.

Others may have more suggestions, but it would probably help if we knew exactly which platforms you were targetting; for example, Chrome (I notice that tag on the question) supports a --plugin-startup-dialog option that is invaluable for attaching to the plugin before it starts up due to the multi-process nature of plugins on Chrome. IE and Firefox both have options to disable OOP (out of process) plugins, which makes attaching to them easier.

这篇关于npapi插件调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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