mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 11:25:16 +08:00
a9ff84e817
Co-authored-by: DustMerlin <39292795+DustMerlin@users.noreply.github.com>
736 B
736 B
arthas-watch
函数执行数据观测。 另请参阅:
arthas,arthas-trace。 更多信息:https://arthas.aliyun.com/en/doc/watch.html。
- 在方法调用后观察,显示第一个参数和返回值,展开嵌套对象的 4 层:
watch {{class-pattern}} {{method-pattern}} {{'{ params[0],returnObj }'}} -x 4
- 在方法调用后观测,当第一个参数的值是 5 时,显示第二个参数和返回值,展开嵌套对象的 4 层:
watch {{class-pattern}} {{method-pattern}} {{'{ params[1],returnObj }'}} {{'"5".equals(params[0])'}} -x 4
- 在方法返回和异常后观测,显示第二个参数的 count 属性:
watch {{class-pattern}} {{method-pattern}} {{'{ params[1].count }'}} -e -s