This repository has been archived by the owner on Apr 7, 2020. It is now read-only.
forked from mkalam-alami/inventory-tweaks
-
Notifications
You must be signed in to change notification settings - Fork 108
Using the eclipse debugger
mkalam-alami edited this page Dec 3, 2011
·
7 revisions
This works for any modding project that isn't developed with the Minecraft Coder Pack.
If you can build InvTweaks with mvn clean install
, do it once, then run Minecraft using the launcher/run.bat
or launcher/run.sh
. You can also link the script to Eclipse using "Run > External Tools > External Tools Configuration... > Program".
- Get the .jar launcher from minecraft.net
- In the same directory as your launcher, create a file (as
run.bat
orrun.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
- 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.