【问题标题】:Rider - What is the shell script debug configuration debugging?Rider - 什么是shell脚本调试配置调试?
【发布时间】:2022-08-08 11:44:18
【问题描述】:

我有一个 shell 脚本,可以在 Kubernetes pod 中启动调试器。在 VSCode 中,我可以将此脚本作为调试配置文件运行,并将其附加到连接到 pod 的本地 kubectl 进程(在脚本中启动)。调试器按预期工作,所有断点都被命中。

然而,在 Rider 中,我将同样的脚本作为调试配置运行,调试器启动但没有遇到断点。正在调试什么?它是附加到 bash 进程而不是 kubectl 进程吗?

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

    标签: bash shell debugging remote-debugging jetbrains-rider


    【解决方案1】:

    调试器启动时注意到这一点:

    -------------------------------------------------------------------
    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.
    -------------------------------------------------------------------
    

    可以尝试其他人,但请暂时忽略问题。

    【讨论】:

      猜你喜欢
      • 2020-06-29
      • 1970-01-01
      • 1970-01-01
      • 2017-01-01
      • 2013-04-18
      • 2023-03-11
      • 2021-01-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多