Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Using the eclipse debugger

mkalam-alami edited this page Dec 3, 2011 · 7 revisions

Using the Eclipse debugger

This works for any modding project that is not based on the Minecraft Coder Pack.

Step 1: Launching Minecraft in debug mode

  • Get the .jar launcher from minecraft.net
  • In the same directory as your launcher, create a file (as run.bator run.sh according to your OS) and set its contents to:
javaw -Xmx1024m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false -classpath minecraft.jar net.minecraft.LauncherFrame
  • Launch the script

Step 2: Configuring Eclipse

  • Run > Debug configurations...
  • Double-click on "Remote Java application" to create a new config
  • Make sure your mod project is selected, the other options should be fine by default (Connection type: "Socket attach", Host: "localhost", Port: "8000")
  • When Minecraft is launched (with the custom script) run the Debug configuration. You can now use breakpoints to pause the code, view the variables etc.
Clone this wiki locally