alperenxrq
New member
- Joined
- Nov 6, 2023
- Messages
- 4
- Reaction score
- 0
- Points
- 1
I want to see the code instantly in IntelliJ IDEA. It's hard to restart my client all the time. I open it in Debug Mode but it doesn't work. Can you help me?
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010
-XXaltjvm=dcevm
-XX:+UnlockExperimentalVMOptions
-javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"
Very good explanationTo hotswap with Intellij do Ctrl + Shift + F9 (default keybinds) in debug mode, but note that with a regular JDK you cannot hotswap new methods, classes, etc., but can add code to existing methods.
You could try out DCEVM which allows you to do those, it is what I personally use, but do note it only supports specific JDKs (such as Java 8 181).
To use it with your client, you'll need two things:
First of all - to install it, decide on your binary and from there you will need to run the downloaded .jar from an elevated command prompt otherwise it will not work.
Now you are able to then able to install it, keep in mind that the binary is specific for the JDK (e.g., the Java 8 181 binary is specific for that version). I personally use the AltJVM.
Use only either OpenJDK or the Oracle JDK for this as explained on their website.
Next you'll need to config your run/debug configuration in IntelliJ (make sure it is running the JDK you've applied DCEVM to), from here you'll need to enable 'VM options' (shown here).
For this, you'll need to add options specifying:
For reference, mine are:
- Experimental VM options (-XX:+UnlockExperimentalVMOptions)
- The Java agent (-javaagent:...)
- The agent parameters (-agentlib:...)
- (AltJVM only) the AltJVM (-XXaltjvm=...)
Code:-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010 -XXaltjvm=dcevm -XX:+UnlockExperimentalVMOptions -javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"
And now, using this you should be able to hotswap freely using DCEVM!
Do note that:
- The running instance may become "corrupted" over-time
- It may cause crashes (infrequent)
- You can't do everything (e.g., it fails to define a new pre-set final variable), but you can do a lot more
I hope this helps, I've tried to simplify it down for you.
TL;DR: Ctrl + Shift + F9 to hotswap by default in Intellij - DCEVM allows you to hotswap a lot more.
Thank you, I will try it soonTo hotswap with Intellij do Ctrl + Shift + F9 (default keybinds) in debug mode, but note that with a regular JDK you cannot hotswap new methods, classes, etc., but can add code to existing methods.
You could try out DCEVM which allows you to do those, it is what I personally use, but do note it only supports specific JDKs (such as Java 8 181).
To use it with your client, you'll need two things:
First of all - to install it, decide on your binary and from there you will need to run the downloaded .jar from an elevated command prompt otherwise it will not work.
Now you are able to then able to install it, keep in mind that the binary is specific for the JDK (e.g., the Java 8 181 binary is specific for that version). I personally use the AltJVM.
Use only either OpenJDK or the Oracle JDK for this as explained on their website.
Next you'll need to config your run/debug configuration in IntelliJ (make sure it is running the JDK you've applied DCEVM to), from here you'll need to enable 'VM options' (shown here).
For this, you'll need to add options specifying:
For reference, mine are:
- Experimental VM options (-XX:+UnlockExperimentalVMOptions)
- The Java agent (-javaagent:...)
- The agent parameters (-agentlib:...)
- (AltJVM only) the AltJVM (-XXaltjvm=...)
Code:-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010 -XXaltjvm=dcevm -XX:+UnlockExperimentalVMOptions -javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"
And now, using this you should be able to hotswap freely using DCEVM!
Do note that:
- The running instance may become "corrupted" over-time
- It may cause crashes (infrequent)
- You can't do everything (e.g., it fails to define a new pre-set final variable), but you can do a lot more
I hope this helps, I've tried to simplify it down for you.
TL;DR: Ctrl + Shift + F9 to hotswap by default in Intellij - DCEVM allows you to hotswap a lot more.
Dude, I did what you said, but the codes I changed are not reflected in the game.To hotswap with Intellij do Ctrl + Shift + F9 (default keybinds) in debug mode, but note that with a regular JDK you cannot hotswap new methods, classes, etc., but can add code to existing methods.
You could try out DCEVM which allows you to do those, it is what I personally use, but do note it only supports specific JDKs (such as Java 8 181).
To use it with your client, you'll need two things:
First of all - to install it, decide on your binary and from there you will need to run the downloaded .jar from an elevated command prompt otherwise it will not work.
Now you are able to then able to install it, keep in mind that the binary is specific for the JDK (e.g., the Java 8 181 binary is specific for that version). I personally use the AltJVM.
Use only either OpenJDK or the Oracle JDK for this as explained on their website.
Next you'll need to config your run/debug configuration in IntelliJ (make sure it is running the JDK you've applied DCEVM to), from here you'll need to enable 'VM options' (shown here).
For this, you'll need to add options specifying:
For reference, mine are:
- Experimental VM options (-XX:+UnlockExperimentalVMOptions)
- The Java agent (-javaagent:...)
- The agent parameters (-agentlib:...)
- (AltJVM only) the AltJVM (-XXaltjvm=...)
Code:-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5010 -XXaltjvm=dcevm -XX:+UnlockExperimentalVMOptions -javaagent:"%USERPROFILE%\hotswap-agent-1.4.1.jar"
And now, using this you should be able to hotswap freely using DCEVM!
Do note that:
- The running instance may become "corrupted" over-time
- It may cause crashes (infrequent)
- You can't do everything (e.g., it fails to define a new pre-set final variable), but you can do a lot more
I hope this helps, I've tried to simplify it down for you.
TL;DR: Ctrl + Shift + F9 to hotswap by default in Intellij - DCEVM allows you to hotswap a lot more.
I'd recommend having a look at the IntelliJ article: Altering the program's execution flowDude, I did what you said, but the codes I changed are not reflected in the game.