idea 本地模拟远程debug
maven 配置
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.lin.remotedebug.RemoteDebugApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
mvn package
win 终端
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=50055 -jar remote-debug-0.0.1-SNAPSHOT.jar
curl http://localhost:8080/remote-debug/test
debug
端口号和上面一致
蓝天和白云是标配。