Unable to auto-attach to debugger
Hey, thank you very much for developing this plugin. I have encountered some problems in the process of using it and I hope to get your help. Here is my Linux system information and I have followed the tutorial to install dotnet、openssh-server and curl
Linux VM-0-16-ubuntu 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
And this is the error message

The console output

The code is compiled locally.
From the looks of it, you have a solid connection and it uploaded/decompressed your project which is great.
This is a known issue w/ remote debugging and unfortunately Microsoft's VSDbg doesn't provide much documentation or feedback other than failing to launch. I have seen firewall issues in the past blocking port access (see 'Additional Resources' below). Also, I've had success debugging console apps on Ubuntu 20.04, but issues on 22.04.
To try and help you out:
- Which version of VS Linux Debugger are you using?
- Which version of Ubuntu are you using?
- Are you able to manually launch and Attach to Process via
VS > Debug > Attach to Process...?- For console apps, you may need to perform,
var _ = Console.ReadLine();and set a breakpoint to it before launching.
- For console apps, you may need to perform,
- Ensure your app is configured for remote debugging.
Additional Resources:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sorry for reopening this issue, but I'm having this exact issue but on the latest version of raspbian instead...
My console output looks exactly like the one provided by the original author and the error popup I get is also the same. I have allowed the VS2022 port (4026) trough the firewall on the pi. I have also made sure the app is configured for remote debugging.
I can attach to the process via VS > Debug > Attach To Process, works just fine. I have also tried adding: var _ = Console.ReadLine();
As the first line in my Main();
None of these options have been able to resolve my problem. Any more suggestions?
After some more digging I found this in the debug adapter host log:
ERROR: Debug adapter error output: bash: line 1: /home/retina/.vs-debugger/vs2022: Is a directory
However, I do not understand how to fix this... :)
If I change the launch json adapterArgs -T argument from: ~/.vsdbg/vs2022 to ~/.vsdbg/vs2022/vsdbg
and then launch the debug manually with the command window and command: DebugAdapterHost.Launch /LaunchJson:"path-to-launch.json" /EngineGuid:541B8A8A-6081-4506-9F0A-1CE771DEBC04
it seems to get further... Seems to me, but Im not sure, that the exported path to vsdbg is incorrect in my launch.json.
thank you @TGlev, reopening this issue. If you have time, please feel free to jump in to address this issue. Unfortunately, been known to be temperamental between environment-to-environment.
thank you @TGlev, reopening this issue. If you have time, please feel free to jump in to address this issue. Unfortunately, been known to be temperamental between environment-to-environment.
Thanks. Im afraid my knowledge doesnt include visual studio extensions. Havent been able to figure much out regarding this issue on my own.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.