2

基于dlv+charles抓包远程调试

 2 years ago
source link: https://yangshuai-uestc.github.io/2022/02/27/%E5%9F%BA%E4%BA%8Edlv-charles%E6%8A%93%E5%8C%85%E8%BF%9C%E7%A8%8B%E8%B0%83%E8%AF%95/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

基于dlv+charles抓包远程调试

背景:最近在看一些源码的过程中,想试试通过debug来进行跟踪,奈何很多服务用到了一些比较老的库,无法本地编译,只能放在devcloud上编译和运行,但又想本地Goland debug。研究了一番后,可通过dlv来实现远程debug。并在本地装一个安卓模拟器通过charles抓包并转发真实的请求

dlv远程调试

https://github.com/go-delve/delve

Goland自带远程调试功能

在项目的根目录下执行如下命令,则会自动编译并运行监听2345端口,同时本地remote debug配置好devcloud的 ip 地址并启动即可开启远程调试

dlv debug --headless --listen=:2345 --api-version=2 --accept-multiclient

项目中的输出会打印在devcloud的console上

Charles抓包安卓https请求

https://www.jianshu.com/p/adcbc085fcae


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK