当前位置:网站首页>arthas使用
arthas使用
2022-07-01 13:01:00 【一个想打代码的yebadi_】
arthas的安装
MAC 与 Linux使用
curl -O https://arthas.aliyun.com/arthas-boot.jar
Windows直接下载即可
https://arthas.aliyun.com/arthas-boot.jar
arthas启动
java -Dfile.encoding=UTF-8 -jar arthas-boot.jar
然后选择自己要的程序
输入编号回车即可
如果要退出使用stop,别用exit;
使用exit退出,如果要进入其他项目会出现端口占用情况,使用stop会关闭arthas
反编译代码
可以确认是否成功部署上新代码
// 反编译命令
格式 jad --source-only 包名到类名 空格 方法名 【--lineNumber true/false】可选项 这个没大用处
举例
jad --source-only com.community.service.CacheService getCache1 --lineNumber false
// 直接看整个类 不添加行号限制
jad --source-only com.hxb.CacheService
watch(最常用)
可以查看请求是否经过这个方法
可以查看耗时长短
可以查看入参,返回值以及异常
watch com.hxb.ext.HostHolderImpl getUser {
params,returnObj} -n 2 -x 1
细节点::
-n 表示查看次数,不设置可能会弹出很多
-x 代表解析的深度,
举例: -x 1的返回值是
@User[com.hxb.model.User@35eaa946],
-x 2的返回值会展示出来。
@User[
id=@Long[54],
type=@Integer[1],
name=@String[管理员],
phone=null,
.....
],
如果出现异常返回值是null,
所以一般需要添加上throwExp
可以展示异常
最终实现
watch com..DepartmentResource newRole {
params,returnObj,throwExp} -n 3 -x 2
有错误希望大家指点!!!
有其他常见的命令或工具也希望大家可以在评论区推荐,感谢。
边栏推荐
- Introduction to reverse debugging PE structure input table output table 05/07
- Analysis report on the development pattern of China's smart emergency industry and the 14th five year plan Ⓠ 2022 ~ 2028
- Function test process in software testing
- JS discolored Lego building blocks
- La taille de la pile spécifiée est petite, spécifiée à la sortie 328k
- Yarn restart applications record recovery
- Project deployment is not difficult at all!
- Operator-1初识Operator
- [Niu Ke's questions -sql big factory interview real questions] no2 User growth scenario (a certain degree of information flow)
- 终端识别技术和管理技术
猜你喜欢

我选的热门专业,四年后成了“天坑”

ROS2 Foxy depthai_ ROS tutorial

shell脚本导入存储过程到数据库

Judea pearl, Turing prize winner: 19 causal inference papers worth reading recently

Content Audit Technology

The future of game guild in decentralized games

启动solr报错The stack size specified is too small,Specify at least 328k

Meta enlarge again! VR new model posted on CVPR oral: read and understand voice like a human

Wang Xing's infinite game ushers in the "ultimate" battle

Shell script imports stored procedures into the database
随机推荐
Manage nodejs with NVM (downgrade the high version to the low version)
There are still many things to be done in the second half of the year
软件测试中功能测试流程
Professor Li Zexiang, Hong Kong University of science and technology: I'm wrong. Why is engineering consciousness more important than the best university?
Router.use() requires a middleware function but got a Object
Wang Xing's infinite game ushers in the "ultimate" battle
机器学习—性能度量
Yarn restart applications record recovery
Analysis report on production and marketing demand and investment forecast of global and Chinese diamond powder industry Ⓤ 2022 ~ 2027
Localtime can't re-enter. It's a pit
Apache-atlas-2.2.0 independent compilation and deployment
9. Use of better scroll and ref
Global and Chinese styrene acrylic lotion polymer development trend and prospect scale prediction report Ⓒ 2022 ~ 2028
What is the future development direction of people with ordinary education, appearance and family background? The career planning after 00 has been made clear
PG basics -- Logical Structure Management (trigger)
[development of large e-commerce projects] performance pressure test - basic concept of pressure test & jmeter-38
In the next stage of digital transformation, digital twin manufacturer Youyi technology announced that it had completed a financing of more than 300 million yuan
CS5268优势替代AG9321MCQ Typec多合一扩展坞方案
oracle cdc 数据传输时,clob类型字段,在update时值会丢失,update前有值,但
Google Earth engine (GEE) - Global Human Settlements grid data 1975-1990-2000-2014 (p2016)