简体   繁体   English

npapi插件调试

[英]npapi plugin debugging

What is the best practice to debug a npapi plugin. 调试npapi插件的最佳实践是什么。 I am currently developing a plugin with the help of nixysa. 我目前正在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; 好吧,我可以开始暗示一个更好的方法是使用FireBreath代替nixysa,但这是不礼貌的,并且可能会消除我的偏见;-)严重的是,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. 我仅推荐FireBreath这样做,因为它可以在IE和Windows上运行,并且具有更多的错误修正和解决方法,以确保所有浏览器和平台都可以正常运行。

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. 在FireBreath Wiki上 ,通常有很多调试插件的建议(如将调试器附加到它们上),所有建议都很好地适用于任何NPAPI插件。

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 . 获得像在Linux上工作那样的调试方法可能特别麻烦 ,因此在linux上,我通常更倾向于使用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. 例如,Chrome(我注意到问题上的标签)支持--plugin-startup-dialog选项,由于Chrome上插件的多进程特性,该选项对于启动之前附加到插件非常有用。 IE and Firefox both have options to disable OOP (out of process) plugins, which makes attaching to them easier. IE和Firefox都有禁用OOP(进程外)插件的选项,这使附加到它们的过程变得更加容易。

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

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