Reputation: 2662
I am writing a mod for Minecraft.
I use neoforged/NeoGradle. I can run Minecraft client with my mod by
gradlew runClient
I know that the mod works, because I can see it in the game. I use IntellijIdea as IDE. And my break points in it don't work.
How to run "gradlew runClient" in debug mode?
Upvotes: 1
Views: 54
Reputation: 1
You can run gradlew runClient
in debug mode by following these steps:
Alt + 9
).runClient
Task
Tasks → forgegradle
(or Tasks → neoforge
depending on the setup).runClient
.runClient
and select Debug
.Open a terminal inside IntelliJ (or any external terminal).
Run the following command:
gradlew runClient --debug-jvm
IntelliJ will stop and wait for a debugger to attach.
Go to Run → Attach Debugger to Process, and select the Minecraft process.
Now breakpoints should work properly.
If breakpoints still don't work, make sure:
-g
flag enabled in build.gradle
).Let me know if you need more help!
Upvotes: 0