Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to auto-attach to debugger #32

Open
Redns opened this issue May 19, 2022 · 9 comments · Fixed by #59
Open

Unable to auto-attach to debugger #32

Redns opened this issue May 19, 2022 · 9 comments · Fixed by #59
Assignees
Labels
feedback-requested Further information is requested help wanted Extra attention is needed pinned
Milestone

Comments

@Redns
Copy link

Redns commented May 19, 2022

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
image

The console output
image

The code is compiled locally.

@DamianSuess
Copy link
Collaborator

DamianSuess commented May 20, 2022

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.
  • Ensure your app is configured for remote debugging.

Additional Resources:

@DamianSuess DamianSuess added help wanted Extra attention is needed feedback-requested Further information is requested labels May 20, 2022
@stale
Copy link

stale bot commented Jun 3, 2022

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.

@stale stale bot added the stale label Jun 3, 2022
@stale stale bot closed this as completed Jun 10, 2022
@TGlev
Copy link

TGlev commented Jan 31, 2023

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?

@TGlev
Copy link

TGlev commented Jan 31, 2023

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

@TGlev
Copy link

TGlev commented Jan 31, 2023

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.

@DamianSuess
Copy link
Collaborator

DamianSuess commented Feb 2, 2023

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.

@DamianSuess DamianSuess reopened this Feb 2, 2023
@stale stale bot removed stale labels Feb 2, 2023
@DamianSuess DamianSuess added this to the vNext milestone Feb 14, 2023
@TGlev
Copy link

TGlev commented Feb 21, 2023

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.

@stale stale bot added the stale label Mar 7, 2023
@DamianSuess DamianSuess removed the stale label Mar 7, 2023
@stale stale bot added the stale label Mar 21, 2023
@DamianSuess DamianSuess removed the stale label Mar 24, 2023
@SuessLabs SuessLabs deleted a comment from stale bot Mar 24, 2023
@SuessLabs SuessLabs deleted a comment from stale bot Mar 24, 2023
@DamianSuess DamianSuess self-assigned this Mar 24, 2023
@stale
Copy link

stale bot commented Apr 7, 2023

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.

@stale stale bot added the stale label Apr 7, 2023
@DamianSuess DamianSuess removed the stale label Apr 11, 2023
@stale
Copy link

stale bot commented Apr 25, 2023

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.

@stale stale bot added the stale label Apr 25, 2023
@stale stale bot closed this as completed May 2, 2023
@github-project-automation github-project-automation bot moved this from To do to Done in VS Linux Debugger May 2, 2023
@DamianSuess DamianSuess removed the stale label May 2, 2023
@DamianSuess DamianSuess moved this from Done to To do in VS Linux Debugger May 2, 2023
@DamianSuess DamianSuess reopened this May 2, 2023
@github-project-automation github-project-automation bot moved this from To do to In progress in VS Linux Debugger May 2, 2023
clahil-linum added a commit to clahil-linum/VsLinuxDebug that referenced this issue May 11, 2023
zeusware added a commit to zeusware/VsLinuxDebug that referenced this issue Jul 2, 2023
…a2-256 for ssh.net, added ssh.exe adapter,.. working version
DamianSuess added a commit that referenced this issue Jul 4, 2023
@DamianSuess DamianSuess linked a pull request Jul 5, 2023 that will close this issue
@DamianSuess DamianSuess changed the title Unable to debug Unable to auto-attach to debugger Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback-requested Further information is requested help wanted Extra attention is needed pinned
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

3 participants