Posted December 2, 20159 yr Back when Forge switched to use ForgeGradle, I was able to discover a Gradle support plugin- allowing me to load ForgeGradle itself as a NetBeans project, and allowing me to put ForgeGradle's complicated functionality under said IDE's control and therefore easy for me to integrate into my favorite development environment. I used the debugClient to debug my game during that time then, when it said it would be deprecated soon, I tried the instructions- using the runClient command with the --debug-jvm argument. However, that has never worked. I just updated my development to the just about the latest Forge (1.8-11.14.4.1572), and the debugClient task no longer exists, as kinda expected. However, the --debug-jvm argument is also not recognized. I've tried using Gradle versions 2.3 (minimum by ForgeGradle), 2.4 (recommended by NetBeans), and 2.9 (latest), but the same error each time. Even so, I'm still very interested in using my NetBeans debugger- there's a particularly vile bug in my mod that I have to track down through massive numbers of debug statements, instead of pausing the run to take a peek at local variable values & execution results, as the debugger does. Is there a task/argument I can use to get ForgeGradle to incite the JVM's debugger the way the debugClient task did, such that NetBeans can latch into it?
December 2, 20159 yr Author but it should have some kind of "Run this main class" functionality, right? Yes, NetBeans does have that kind of functionality. However, it is dependent upon the project... Because the project is loaded as a Gradle project, all the dependencies are loaded into it- and also the only way I can run it is through Gradle tasks.
December 3, 20159 yr Author Then honestly that is a pretty broken piece of IDE you are using there. I know this is not helpful, but yeah. Yes... The Gradle plugin- which defines the Gradle project in Netbeans and everything that happens with it- is in beta..... NetBeans is really efficient for the default projects, though- full steam ahead! -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 , this might be specific to IntelliJ though) Yes... On previous versions, if I ran the debugClient task manually, it would then bind while waiting for the debugger to hook to it on port 5005. However, since I bound it to the debug button, every time I clicked that button, NetBeans then waited for the run to start waiting and immediately bind to it. In essence, what you've just described is automatically handled by the IDE- I just have to get the JVM to start in debugging mode! Come to think of it... A possible solution would be to replicate that old debugClient task, but I don't know what it might have looked like.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.