Istio Data Plane Development# Debugging Envoy sidecar C++ code in an Istio mesh Introduction My motivation Architecture Environment Assumption Environment construction steps 1. Build istio-proxy with debug info 1.1 Clone source code 1.2 start istio-proxy-builder container 1.3 build istio-proxy 2. Setup testing pod 2.1 Build debug istio-proxy docker image 2.2 run target pod 2.3 start lldb server Test lldb-server(Optional) 3. Attach testing istio-proxy with debuger 3.1 start lldb-vscode-server container 3.2 VSCode attach lldb-vscode-server container 3.3 lldb remote attach Envoy process 3.3.1 Create launch.json 3.3.2 Attach remote process 4. Debuging FAQ containerd allow pull image from plain http docker image registry Dynamic path Why use lldb not gdb More Cloud native flavor of remote debugging Debugging and observing the startup of the istio-proxy Envoy sidecar The Difficulty of initialization debugging Envoy’s startup attach method Manually injected istio-proxy container 1. Customizing the istio-proxy environment for manual pull-ups 2. Start remote debug server and vscode debug session 2.1 Setting breakpoints 3. Start pilot-agent and envoy 4. 开始 debug Common breakpoints Appendices - some memos to myself Istio auto inject for sidecar container (I did not use this method) Debugger wait process on worker node Debugger follow process fork Debugger wrapper script Traffic debug lldb common command list