idea中使用arthas

安装arthas插件

在插件管理中搜索 arthas 选择第一个 arthas idea, 插件作者是汪小哥
Snipaste_2022-04-08_14-50-18

在idea中使用

在代码中选择一个类中的方法,然后右键-> Arthas Command-> 选项里面就有了watch/trace/stack等选项, 单击一下就复制好了
Snipaste_2022-04-08_14-57-37

复制的代码为

trace com.open.capacity.ordercenter.controller.api.OrderAPIController reRecipe  -n 5 --skipJDKMethod false 
  • 复制出来的默认给们加了参数 -n 5 就代表只打印五次输出的内容,根据自己需要把-n 5参数去掉或把5换成其他的数字