Hearen / arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
https://alibaba.github.io/arthas/
GNU General Public License v3.0
0 stars 0 forks source link

Debug Arthas #20

Open Hearen opened 6 years ago

Hearen commented 6 years ago

https://github.com/alibaba/arthas/issues/222

Create a demo and make it listen at 8000

javac Demo.java && java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000 Demo

Configure remote debug and Start Arthas

# Run -> Edit Configuration -> + Remote and fill in port: 8000 -> name it as demo-remote

# debug demo-remote

# it's time to start Arthas bin/as.sh and select the Demo

# debugging time now ~
Hearen commented 6 years ago

Debug shell script

$ export PS4='(${BASH_SOURCE}:${LINENO}): - [${SHLVL},${BASH_SUBSHELL},$?] $ '

$ bash -x bin/as.sh
Hearen commented 6 years ago

Port taken

# Telnet Checking
lsof -nP -iTCP:3658 | grep LISTEN 

# Http Checking
lsof -nP -iTCP:8563 | grep LISTEN