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


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-, 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


, 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!





, 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.

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.


  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • This doesn't make any sense. There is no stack here.
    • Hello, Sorry for writing back again but despite several attempts I did not manage to change/create the tags. They always have the value 0.0 here's my code: package net.the_goldbeards.lootdebugs.Items.Weapons.Drills; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.BlockTags; import net.minecraft.tags.Tag; import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.*; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.TorchBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.Tags; import net.the_goldbeards.lootdebugs.util.ModSounds; import net.the_goldbeards.lootdebugs.util.ModTags; import org.jetbrains.annotations.Nullable; import java.util.List; public class DrillsItem extends Item { @Override public int getItemStackLimit(ItemStack stack) { return 1; } public DrillsItem(Properties pProperties, float FUELAMMOUNT) { super(pProperties); ItemStack pStack = new ItemStack(this); pStack.getOrCreateTag().putFloat("lootdebugs.drillfuel", FUELAMMOUNT); } @Override public InteractionResult useOn(UseOnContext pContext) { ItemStack pStack = new ItemStack(pContext.getPlayer().getItemInHand(pContext.getHand()).getItem()); pStack.getOrCreateTag().putFloat("lootdebugs.drillfuel", 12f);//Debug return InteractionResult.PASS; } @Override public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) { Float val = pStack.getOrCreateTag().getFloat("lootdebugs.drillfuel"); pTooltipComponents.add(new TextComponent(val.toString())); } }   Thanks
    • Just a gradle plugin that can use yarn mapping for forge developing
    • Well, it's ok. Caused by the modid shouldn't include "-". Replaced with "_"
    • You registered something to the event bus, but it has no event handler methods. So nothing happens. Use OverlayRegistry to add something to the HUD.
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

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