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

[1.12.2] [IntelliJ] Debugging Vanilla Minecraft


Recommended Posts

I found out that you can debug Vanilla Minecraft with IntelliJ recently. Heres how

1) Go to the Minecraft Launcher and add -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5009 to your JVM arguments

111.thumb.png.c4611fe7baed5baeb986bccf15411e17.png

2) Launch Minecraft normally

3) In IntelliJ go to Run > Attach to Process

638221203_ScreenShot2018-11-18at2_42_53pm.thumb.png.752f147bc45d6abca0d11bc9e6275cac.png

4) Select net.minecraft.launchwrapper.Launch

997497605_ScreenShot2018-11-18at2_43_22pm.png.3946988d356c7c108879a7942da36b7f.png

Hope this helps someone

 

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to post
Share on other sites

You are also able to hot-swap code directly into the running program. If you want to you can also change the JVM to use DCEVM (Dynamic Code Evolution VM) for even more advanced hot-swap, but Mojang's default JVM arguments (specifically the -XX:+UseG1GC argument) cause a crash when using this JVM. The final arguments that I use are

-Xms1536M
-Xmx2048M
-XX:+UnlockExperimentalVMOptions
-XX:G1NewSizePercent=20
-XX:G1ReservePercent=20
-XX:MaxGCPauseMillis=50
-XX:G1HeapRegionSize=32M
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5009

df.thumb.png.4a9c9c647fdc0398e3930935d99d2fb2.png

If you are using DCEVM as an alternate JVM add -XXaltjvm=dcevm to the arguments

For more help read community.liferay/blogs/java-classes-instant-reloading-using-dcevm-hotswap-agent and GitHub/DCEVM

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to post
Share on other sites
  • 2 months later...
  • Like 1

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to post
Share on other sites
  • 1 year later...
On 11/23/2018 at 8:43 PM, Cadiboo said:

You are also able to hot-swap code directly into the running program. If you want to you can also change the JVM to use DCEVM (Dynamic Code Evolution VM) for even more advanced hot-swap, but Mojang's default JVM arguments (specifically the -XX:+UseG1GC argument) cause a crash when using this JVM. The final arguments that I use are


-Xms1536M
-Xmx2048M
-XX:+UnlockExperimentalVMOptions
-XX:G1NewSizePercent=20
-XX:G1ReservePercent=20
-XX:MaxGCPauseMillis=50
-XX:G1HeapRegionSize=32M
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5009

df.thumb.png.4a9c9c647fdc0398e3930935d99d2fb2.png

If you are using DCEVM as an alternate JVM add -XXaltjvm=dcevm to the arguments

For more help read community.liferay/blogs/java-classes-instant-reloading-using-dcevm-hotswap-agent and GitHub/DCEVM

 

Is this still valid?

I'm trying it with IntelliJ, and in the settings it's saying that it can't find a valid install of DCEVM... even though I just installed it.

[EDIT: Nevermind, I fixed that problem... it had selected the wrong SDK directory. But it is saying that it "couldn't get dceversion of C:/.../java/jdk1.8.0_211_DCEVM" (the directory I installed it to. Basically made a copy of the JDK directory and selected that as the install location, so that I still had a clean install.)

 

I did notice that the latest version on the DCEVM downloads page was for SDK version 1.8.0_181 however. Is that compatible? I mean, I guess I'll find out if it works or not, but is there a new site for it or something? This post was made about two years ago now...

 

Edited by Intrepid249
updated information
Link to post
Share on other sites

1.12 is no longer supported on these forums due to age, this thread is over a year old.

 

If you are having an issue with a modern/supported version, please start your own thread with relevant information on your issue, including code/logs.

Link to post
Share on other sites
Guest
This topic is now closed to further replies.


  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • no explaining to do here StickSword_V1.3.3.zip
    • I just uploaded my mod folder, but I already noticed that and removed it.
    • 1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • ... Why did you install optifine on the server?
    • Hello! Wanted to make a server, and when i launched the server with all of the mods but unfortunatly it keeps crashing =(  Can someone tell me what to do in order to fix it? I would really appreciate any help 😃       Server log: Starting Gameserver now... [18:44:48] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.1.6, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui] [18:44:48] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 1.8.0_272 by Red Hat, Inc. [18:44:49] [main/INFO] [op.OptiFineTransformationService/]: OptiFineTransformationService.onLoad [18:44:49] [main/INFO] [op.OptiFineTransformationService/]: OptiFine ZIP file: /mnt/minecraftotherpacks/mods/OptiFine_1.16.5_HD_U_G7_MOD.jar [18:44:49] [main/INFO] [op.OptiFineTransformer/]: Target.PRE_CLASS is available [18:44:49] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [18:44:49] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/mnt/minecraftotherpacks/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=SERVER [18:44:49] [main/INFO] [op.OptiFineTransformationService/]: OptiFineTransformationService.initialize [18:44:50] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:0 token recognition error at: '~' [18:44:50] [main/INFO] [op.OptiFineTransformationService/]: OptiFineTransformationService.transformers [18:44:50] [main/INFO] [op.OptiFineTransformer/]: Targets: 308 [18:44:50] [main/INFO] [op.OptiFineTransformationService/]: additionalClassesLocator: [optifine., net.optifine.] [18:44:51] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [com.qouteall.hiding_in_the_bushes.MyMixinConnector] [18:44:51] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [tictim.paraglider.MixinConnector] [18:44:51] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [midnight.core.MixinConnector] [18:44:51] [main/INFO] [Portal/]: Invoking Mixin Connector [18:44:51] [main/ERROR] [mixin/]: Mixin config imm_ptl_mixins.json does not specify "minVersion" property [18:44:51] [main/ERROR] [mixin/]: Mixin config imm_ptl_mixins_forge.json does not specify "minVersion" property [18:44:51] [main/ERROR] [mixin/]: Mixin config imm_ptl_peripheral_mixins.json does not specify "minVersion" property [18:44:51] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlserver' with arguments [--gameDir, ., nogui] [18:44:52] [main/WARN] [mixin/]: @Mixin target net/minecraft/world/server/ChunkManager$EntityTracker is public in imm_ptl_mixins.json:common.entity_sync.MixinEntityTracker and should be specified in value [18:44:52] [main/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER Exception in thread "main" [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.reflect.InvocationTargetException [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at java.lang.reflect.Method.invoke(Method.java:498) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [18:44:52] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: ... 7 more [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: Caused by: java.lang.ExceptionInInitializerError [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.crash.CrashReport.func_71504_g(CrashReport.java:101) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.crash.CrashReport.<init>(CrashReport.java:54) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.crash.CrashReport.func_230188_h_(CrashReport.java:425) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: at net.minecraft.server.Main.main(Main.java:91) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: ... 13 more [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:265) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at java.lang.ClassLoader.loadClass(ClassLoader.java:351) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: at net.optifine.reflect.Reflector.<clinit>(Reflector.java:185) [18:44:52] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:668]: ... 17 more Gameserver exited without success - 1 Exiting now...     "[18:51:30] [main/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/gui/screen/Screen for invalid dist DEDICATED_SERVER" I think this one might be the Error, but I dont know how to fix that
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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