Debug and run agent module locally
Description
- This article will introduce how to debug and run the
shenyu-agentmodule locally
Prepare
- Pull the Apache ShenYu code
- Install IDEA
- Refer to local deployment to download and compile the code
Set JVM startup parameters
In IDEA, set VM options in the startup parameters of ShenyuBootstrapApplication.java as:
-javaagent:~/shenyu/shenyu-dist/shenyu-agent-dist/target/shenyu-agent/shenyu-agent.jar
Among them, the parameter followed by -javaagent: is the absolute path of shenyu-agent.jar, which is packaged by shenyu-dist.
Run/Debug
Then, start ShenyuBootstrapApplication.java for normal operation or debugging, and the shenyu-agent module can be debugged with breakpoints normally.