tags:
– pycharm
– idapython
– debug
1. 下载 pydevd-pycharm
根据pycharm 的提示安装相对应的版本
比如这里是 pip install pydevd-pycharm~=202.7660.27
并且在脚本里加入下面代码
1 2 3 |
import pydevd_pycharm pydevd_pycharm.settrace('localhost', port=12345, stdoutToServer=True, stderrToServer=True) |
2. 启动Server
按步骤 1 配置好 debug 后就可以启动 Server 了,等待连接
3. IDA 配置
编辑 /Applications/IDAPro7.3/ida.app/Contents/MacOS/python/init.py
插入我们的 python 环境的路径
运行脚本
**用 File -> ScriptFile … (alt+F7) 来运行脚本
即可在 pycharm 端单步调试了
- 注意: 不要用
shift+F2
运行脚本,会提示找不到映射文件:
1 2 3 |
Remote file /xxxx/xxxx/ is mapped to the local path /xxxx/xxxx/ and can't be found. You can continue debugging, but without the source. To fix that you can do one of the following: |