@DsRulesAll - More than happy to. There are likely many varations that will work, but, this approach is what I did:
First, I modified my launcher .BAT file command to add the flags NeuminTo showed to my existing startup memory flags flags, giving:
"%MyJavaPathVariablePathGoesHere%\java.exe" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n -Xmx3G -Xms1024M -jar forge-1.8-11.14.3.1543-universal.jar
Then launch the server.
Then, in Eclipse, select **Run **menu, select Run/Debug configurations, select Remove Java Applications.
Click the “New” button-icon to generate 3 tabs of settings…
Specify a **Name **for the app (ie SpongeforgeServer).
Leave project blank.
Connection type: Standard socket attach
host: localhost * << this can be a different ip from your computer if you roll that way*
port: 5005 << Same one added to the launcher bat command
That’s it. The config will be saved under the name specified, hit debug and it will open a connection.
Switch to your Debug perspective and fiddle with the layout.
You can now make changes to your code, save, and it is hot-swapped to the server. It only updates when you save.
Provided you don’t generate and save syntax errors in the code when making changes, or change method names, you can continuously edit-and-save=swap the code on the server. Syntax errors, changed methods -> hot swapping ends (and server usually freezes up and dies)
Despite what your code source will show on screen***, the plugin jar file on the server is the initial state of the code.running on it ***(naturally) So if you make lots of file changes but don’t replace the jar, when it comes time to need to reboot the server, the server wont be running the project source code… But after reconnecting the debugger to it, just add a space somewhere in your file to force a ‘dirty file’ state to allow you to save the files again, and you’re code is in synch again with server.
If the server terminates, or the connection severed by the debugger, it may still appear as a connection but to a terminated service.
After restarting the server from a crash/recovery OR when you sit down to start working a new session, simply pick Run menu–> Debug and it should force refresh the connection, but sometimes it may throw errors due to sticking on a terminated link. If that happens, select the Disconnect entry from context menus or Run menu to clear the debug link, then the run->debug will fetch a fresh connection, and you’re good to go.
====
*Struggle-Saver hint: * Keep in mind that even with you making changes, the server / plugin is not resetting. If you have classes with static features ie a builder or helper function class, and an initialization routine that is only called once for it, any changes in that initialization routine will not take effect on the server since you are merely live-editing a method that is never run again until the server is rebooted.