I have a shell script that starts a debugger in a Kubernetes pod. In VSCode, I can run this script as a debug profile and it attaches to the local kubectl process (started in the script) that's connected to the pod. The debugger works as expected and all breakpoints are hit.
In Rider, however, I run this same script as a debug configuration and the debugger starts but no breakpoints are hit. What is being debugged? Is it that it's attached to the bash process instead of the kubectl process?
kube-debug.sh
STORAGE_UID=`kubectl get pvc/$1-bin -o jsonpath='{.metadata.uid}'`
echo "Copying to storage: $STORAGE_UID"
rsync -av bin/Debug/net6.0/* user@storage-server:/srv/default-$1-bin-pvc-$STORAGE_UID/
POD=`kubectl get pods --selector=app=$1 -o jsonpath='{.items[0].metadata.name}'`
echo "Deleting pod: $POD"
kubectl delete pods/$POD
kubectl wait pod -l app=$1 --for=condition=Ready
POD=`kubectl get pods --selector=app=$1 -o jsonpath='{.items[0].metadata.name}'`
echo "Debugging pod: $POD"
# This is the line where I was hoping the debugger
# would attach to the kubectl process as it does in VSCode
kubectl exec $POD -i -- ../vsdbg/vsdbg
CodePudding user response:
Noticed this when the debugger was starting up:
-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
May try others but please disregard question for now.