With this method you will be able to run your server and debug your plugin directly from your IDE with no restarts (and maven packaging) required between changes! Step 1 | Setting Up The Server Configuration The steps are very similar to the methods above. agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005Without the star in address=*:5005 it will not work on the latest version of java Method 3: IDE as Debug Server (Local) Now you need to modify server=y option of agentlib, it must be server=n. Step 2 | Editing the Server Startup Command So, we will use jvm arguments from first method with one small modification, which described in step 2. Then you can copy "Command line arguments for remote JVM", but it's contains optional params, which you need to setup manually. In debug configuration that you've created, change "Debugger mode" from "Attach to remote JVM" to "Listen to remote JVM". Therefore, I will describe only differ of steps from method 1. If you need to debug your plugin at server startup time (for example, plugin onLoad() or onEnable() methods) you may want to use IDE as Debug Server instead of spigot server itself. You should not change it for production servers ofcourse).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |