简体   繁体   English

如何调试第三方 Intellij IDEA 插件?

[英]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.

相关问题 如何调试第三方Gradle插件? - How to debug a third-party Gradle plugin? 我应该在哪里存储要包含在IntelliJ IDEA项目中的第三方库? - Where should I store third-party libraries for inclusion in IntelliJ IDEA projects? 用于IntelliJ IDEA的Grepcode插件-可以将调试器附加到第三方库,而无需将源加载到IDEA吗? - Grepcode plugin for IntelliJ IDEA- can debugger be attached to third party library without source loaded into IDEA? 是否可以在第三方Android应用程序中调试类? - Is it possible to debug classes in a third-party Android application? 如何使用p2-maven-plugin有效管理第三方依赖? - How to efficiently manage third-party dependencies with p2-maven-plugin? Android / PhoneGap:在插件开发中使用第三方库 - Android/PhoneGap: Using third-party libraries in plugin-development IntelliJ IDEA不会进入第三方jar中的方法 - IntelliJ IDEA won't step into method in third party jar 如何在私有静态方法中模拟第三方类? - How to mock a third-party class in private static method? 如何在第三方Maven依赖项中使用执行切入点? - How to use execution pointcut with third-party maven dependency? 如何使用配置类中的第三方实现来管理JAR? - How to manage JARs with third-party implementations in configuration classes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM