# Debugging a Plugin

**URL:** <https://community.graylog.org/t/debugging-a-plugin/1786>\
**Category:** Development\
**Created:** [July 19, 2017, 8:08pm UTC](https://community.graylog.org/t/debugging-a-plugin/1786 "2017-07-19T20:08:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbrocker](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/pbrocker/32/889_2.png) [@pbrocker](https://community.graylog.org/u/pbrocker)\
**Post date:** [July 19, 2017, 8:08pm UTC](https://community.graylog.org/t/debugging-a-plugin/1786/1 "2017-07-19T20:08:05Z")

</div>

Is there an easy way to debug a plugin (the java portion of it). Right now I have to compile the plugin via `mvn package` then load it into my graylog2-server and have it print logs to check things via a `Logger`.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [July 20, 2017, 6:53am UTC](https://community.graylog.org/t/debugging-a-plugin/1786/2 "2017-07-20T06:53:16Z")

</div>

Using [graylog-project](https://github.com/Graylog2/graylog-project) and the [graylog-project-cli](https://github.com/Graylog2/graylog-project-cli) tool, you can create a multi-module build including Graylog and your plugin.

This way you can, for example, use IntelliJ IDEA to debug the plugin running inside Graylog like any other piece of code.

---

<div class="post-metadata">

**Author:** ![pbrocker](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/pbrocker/32/889_2.png) [@pbrocker](https://community.graylog.org/u/pbrocker)\
**Post date:** [July 20, 2017, 1:56pm UTC](https://community.graylog.org/t/debugging-a-plugin/1786/3 "2017-07-20T13:56:15Z")

</div>

Added my plugin as a module in the pom.xml of [graylog-project](https://github.com/Graylog2/graylog-project) and also as a dependency! Works great!!! Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [August 3, 2017, 1:56pm UTC](https://community.graylog.org/t/debugging-a-plugin/1786/4 "2017-08-03T13:56:29Z")

</div>

Closed on August 3, 2017, 1:56pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
