What is the shell script debug configuration debugging?

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?

Comment actions Permalink

Thank you for contacting Rider support.

The process that is being debugged is a bash process. Regrettably, this scenario is not supported in Rider yet.
We are interested in Kubernetes support. Would you mind sharing your script (or general sample) wih us, so we could take a look deeper at your case and create a feature request?

As an available option, you can try attaching the debugger to the process in your pod via SSH. Here you can find a general instruction for remote debugging.

Thank you in advance and have a nice day!

Comment actions Permalink

Hi Dmitry,

Thanks for getting back to me!

My script is as follows:

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

This is actually more preferable to me than the kubernetes-specific features I've used in other IDE's (although JetBrains makes such great stuff that I'm sure yours would be much better).

Being able to attach to any process within a script like this opens the door to all sorts of possibilities, especially with something like Kubernetes.  For example, with a script, I could have a debug config that scales a deployment to 3 pods before attaching the debugger to one of them.  I tend to develop using one pod at a time but periodically like to scale up to verify that I'm sufficiently stateless.  Being able to do this through a script that can be checked in to source control and isn't limited by a UI would be amazing.

This is possible in VS Code and I've been able to do it in VS with a custom extension but if something like this were available out of the box in Rider, you'd have a customer for life!

Thanks again and let me know if I can provide any additional info.

Comment actions Permalink


I noticed this in the output from vsdbg so this particular debugger might not be the best test case.

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.

I may try some others but would be interested in your direction here.

Comment actions Permalink


I created this feature request on our tracker. We would appreciate it if you could upvote the issue to demonstrate the additional interest. You can monitor further updates on the issue page.

Should you have any other questions or difficulties, please let me know. Have a nice day!


Please sign in to leave a comment.