I want to know the best way to debug a plugin for Teamcity. My current approach is to run mvn package, upload the zip file to Teamcity and then restart the server. This takes too much time. I've read I can pass this parameter to the JVM "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5555" but I don't understand how can I debug a plugin if its not compiled by maven and then uploaded to the server?
If I create a breakpoint in my java code locally, how does the Teamcity instance know it should use this new code with the breakpoint?
It would be very helpful to see a video about this or a detailed guide. I cannot find this question properly answered anywhere.