SuessLabs / VsLinuxDebug

VS Extension to remotely deploy and debug your .NET (Core) C# solutions directly to your Linux or Raspberry Pi devices! .NET Core 3.1, .NET 5, 6, 7, 8, 9
https://marketplace.visualstudio.com/items?itemName=SuessLabs.VSLinuxDebugger
MIT License
37 stars 8 forks source link

[Enhancement] Start debugging with sudo #77

Closed smint80 closed 10 months ago

smint80 commented 10 months ago

Description

I would be very nice to be able to start the debugging session with sudo when developing software that need to be run with admin rights. Often that ise the case when developing systemd services.

Right now I have to use the build and deploy and the use the DebugAdapterHost.Launch manually from the command window to do that. The only thing different from the generated launch.json and my manually written launch.json that works is the adapter args.

Generated: -ssh -pw password user@host -T ~/vsdbg/vs2022/vsdbg --engineLogging=./VSLinuxDbg/Application/_vsdbg.log Needed: -ssh -pw password user@host -batch -T sudo ~/vsdbg/vs2022/vsdbg --engineLogging=./VSLinuxDbg/Application/_vsdbg.log

It would be nice to implement an option for this.

github-actions[bot] commented 10 months ago

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.

DamianSuess commented 10 months ago

There aren't any plans to include sudo just yet. However, don't be discouraged, your suggested feature may appear in a future release once the advanced settings dialog that will be implemented in the near future.

Until then, I suggest that your application execute elevated procedures when necessary versus the entire application if possible. I can dig up a sample of this if you'd like.