minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.5k stars 186 forks source link

Optionally set up basic debugging support for plugins #768

Open ryantheleach opened 4 years ago

ryantheleach commented 4 years ago

When creating a new project from a template, It would be helpful to beginners if a basic debugging option was available.

Too many new plugin dev's arn't aware of the debugging capabilities, or how to nicely automate them, and inclusion in MC-Dev would simplify this for them.

For experienced programmers from other languages, this would still be incredibly useful, as not everyone is familiar with Java project conventions.

DenWav commented 4 years ago

Would you be willing to contribute the Sponge config? I could setup the Bukkit stuff easily enough.

ryantheleach commented 4 years ago

I've not been involved in Sponge development for a while now. It'd take me significant effort and re-learning to re-set up a config for sponge plugin development. Perhaps someone more active in the Sponge community could help out.

DenWav commented 4 years ago

That would be true for me as well :). But I'll see what I can do.

DenWav commented 4 years ago

@RedNesto could probably help with this.

RedNesto commented 4 years ago

Maybe I could ^^ But I don't see what's needed for debugging a Sponge plugin. Do you want mcdev to create a Sponge server and a Gradle task to launch it in debugging (I did that for a plugin and it works well)

ryantheleach commented 4 years ago

I'm not sure the best way of going about it.

On Bukkit/Gradle I've been using https://github.com/EndlessCodeGroup/BukkitGradle but I'm not sure if it's ready to be widely used, considering the few bugs that I ran into. It's also pretty opinionated (at the moment) about placing plugin.yml stuff into the build.gradle

RedNesto commented 4 years ago

I used SpongeStart a few years ago, can't say if it still works correctly today. I am not aware of any alternative to it. We can can use my bootleg solution (it really is a couple of line in the build.gradle and a system property) but of course it requires a Sponge server (mcdev could download the latest SpongeVanilla RC and put it in the ./run/ for example.)

DenWav commented 4 years ago

I have looked at BukkitGradle and decided I don't really like it. It's possible to set that up as a run configuration in Gradle very easily with an Ivy dependency pointing to the paperclip downloads and a Jar task using that jar as the classpath.

DenWav commented 4 years ago

This same structure could be used for Sponge as well for sure.