Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[ForgeGradle 2.0.2] NetBeans debugger functionality blocked by newer version


superinventor
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Then honestly that is a pretty broken piece of IDE you are using there. I know this is not helpful, but yeah.

 

You should however be able to tell the runClient task to launch the JVM in debug mode (IntelliJ tells me the command line arguments are something like

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

, this might be specific to IntelliJ though) and then attach NetBeans' debugger to that process, I am not sure how to do that or if it's even possible though. It is certainly possible in IntelliJ using a "Remote" launch configuration.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.