[英]How to debug third-party Intellij IDEA plugin?
So, I am using a plugin from the Intellij IDEA Marketplace and I'd like to modify it to my needs.所以,我正在使用 Intellij IDEA Marketplace 中的插件,我想根据我的需要对其进行修改。 The plugin is Open Source(Apache License) but I couldn't find its source code on the internet.该插件是开源(Apache 许可证),但我在互联网上找不到它的源代码。 I know that plugins are located under Users
directory in Windows, so I could decompile the jar and see the source code.我知道插件位于Windows的Users
目录下,所以我可以反编译jar并查看源代码。 But the problem is that this plugin contains some dll
files as well.但问题是这个插件也包含一些dll
文件。
Is there an easy way to debug the plugin and set breakpoints etc. to see where I will need to modify the code(the other option would be to include the decompiled java source files in a new plugin build but I don't know what to do with the existing dll
files).有没有一种简单的方法来调试插件并设置断点等以查看我需要修改代码的位置(另一种选择是将反编译的 java 源文件包含在新的插件构建中,但我不知道该怎么做使用现有的dll
文件)。
Thank you.谢谢你。
Intellij Idea plugin development requires a project structure and it requires gradle-intellij-plugin . Intellij Idea 插件开发需要一个项目结构,它需要gradle-intellij-plugin 。 If you are able to compile the source code, you have to create gradle project with gradle-intellij-plugin.如果您能够编译源代码,则必须使用 gradle-intellij-plugin 创建 gradle 项目。 First of all follow the links to create a small plugin to understand how to create a plugin.首先按照链接创建一个小插件来了解如何创建一个插件。
https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system.html https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system.html
As a sample project, you can refer below the github project.作为示例项目,您可以参考下面的 github 项目。
https://github.com/debjava/ddlab-gitpusher-idea https://github.com/debjava/ddlab-gitpusher-idea
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.