gpt4 book ai didi

ubuntu - Visual Studio : how can I debug a remote application which is running as root?

转载 作者:行者123 更新时间:2023-12-04 19:25:09 25 4
gpt4 key购买 nike

我有一个应用程序在 GCP 中的 Ubuntu 实例上运行。该程序在端口 80 上打开服务器,因此必须以 root 身份运行。

我已成功设置 SSH 连接,但当我尝试远程连接该进程时,出现错误:

Failed to attach to process: The .NET debugger has insufficientprivileges to debug this process

enter image description here

我尝试使用 sudo .vs-debugger/vs2022/vsdbg 启动 vsdbg,但遇到了同样的错误。

我如何附加到此流程?

最佳答案

我找到了一种破解方法。

cd ~/.vs-debugger/vs2022/

mv vsdbg vsdbg.original

nano vsdbg

将其复制到该文件中:

#!/bin/bash
sudo ~/.vs-debugger/vs2022/vsdbg.original $@

瞧。

关于ubuntu - Visual Studio : how can I debug a remote application which is running as root?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71869385/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com