Can't run/debug SpongeForge using IntelliJ IDEA


#1

Trying to build and run SpongeForge using Intellij IDEA in order to make debugging easier. However i can’t figure out what am i doing wrong.

Here is what i did:

Firstly i initialized SpongeForge:

git clone --recursive https://github.com/SpongePowered/SpongeForge.git
cd SpongeForge
cp scripts/pre-commit .git/hooks
./gradlew setupDecompWorkspace --refresh-dependencies
./gradlew idea genIntellijRuns

Then i opened SpongeForge.ipr, clicked on import Gradle project, checked the following:

  • Use auto-import
  • Create separate module per source set
  • Use default Gradle wrapper (the one that is in repository by default)
    and pressed OK.

After several seconds SpongeForge sync was finished successfully.

Then i closed IDEA and run ./gradlew genIntellijRuns, it was successful (except deprecation warnings WHY though??).

It is worth noting that the algorithm described in README didn’t work for me (the exception had occurred while trying to execute ./gradlew genIntellijRuns)

Next i launched my IDEA and it asked me for import Gradle project again. I did the same as before.

After that i run ./gradlew in order to build the project. It seemed to be successful either.

At this step there were two Run/Debug configurations: Minecraft Client and Minecraft Server. Both had the following error: “Module not specified”. I solved it by choosing SpongeForge.main module.

Then i closed the configuration window and clicked on a green bug in the top right corner of IDEA in order to launch a debugging tool for Minecraft Server. It came with lots of errors.

So what am i doing wrong? Any help will be appreciated.

Some system information:

  • OS: Windows 10 x64
  • JDK: u1.8.0_212

#2

Could it be related to Gradlew genIntelliJRuns leads to java.lang.NullPointerException ?


#3

Thank you for your reply, @RedRelay.

I had the problem you’re talking about and I even mentioned it:

It is worth noting that the algorithm described in README didn’t work for me (the exception had occurred while trying to execute ./gradlew genIntellijRuns ).

Also i described a solution to the NullPointerException above.
However i still cannot Run/Debug it. :weary:


#4

The problem is still relevant to me. :disappointed: