docker里面不能进行gdb调试
To attach to an application on Linux, login as super user or set ptrace_scope to 0.
See https://aka.ms/miengine-gdb-troubleshooting for details.
三个解决方案
1
echo 0| sudo tee /proc/sys/kernel/yama/ptrace_scope
2
sudo setcap cap_sys_ptrace=eip /usr/bin/gdb
3
Alternatively, launch GDB as super user and attach to processes. Use root@machine to login with a password or certificate. Note, many Linux distros are configured to disallow root login through SSH for security reasons. You may have to configure /etc/ssh/sshd_config to allow root login with certificate or password. You can verify SSH connection via a client like putty.exe in windows.

浙公网安备 33010602011771号