-
Notifications
You must be signed in to change notification settings - Fork 677
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
Debugger: Improve the error message when vscode attempt to attach to dotnet process with mismatched privilege #477
Comments
Thanks for reporting. I'm looking into it. |
Internal error message now includes "Access is denied." Should there be another message instead? |
That error message looks reasonable to me. The only thing we might want to do is detect that admin privileges are needed and launch vsdbg as an admin process. But we could also just wait for someone to ask for the feature. |
This is an issue for me. Is there a way to elevate this process manually? I am kind of a noob when it comes to vscode. What @gregg-miskelly said would be useful. If you need the manpower, I may be willing to try helping. |
@kroppt What OS are you on? |
@gregg-miskelly |
@kroppt If you close VS Code, right click on it from the start menu/task bar, and choose 'Run as administrator' the debugger should run elevated and therefore be able to attach to the process. |
This did not work for me. It is worth noting that dotnet is running under NETWORKSERVICE, which has access to some SQL Active Directory stuff. Administrator should be able to operate on such a process I believe. I am also kind of a noob when it comes to Windows user permissions. |
@kroppt Yes, I would expect that to work. Can you give me the full error message to see if that gives me any more hints as to what could be going on? |
On Linux/OSX I think we should consider auto-elevating in this scenario. This is related to #1811 |
Lets see if we can fix this for 1.16, as several people have hit into it now. |
Environment data
dotnet --info
output:VS Code version:1.2.1
C# Extension version:1.1.7
Steps to reproduce
Create a sample .dotnet core console application with following code:
Launch vscode with non-admin and open the project
Launch command line with admin, and run the application "dotnet run"
Set the target as "attach" and configure the process id of "dotnet"
F5
Expected behavior
Actually, when I did the testing, I was not aware of launching vscode with non-admin, I suppose this is not supported scenario, however I assume we should at least improve the error message,
Actual behavior
Error: No process with the specified id is currently running.
(This is VSDBGE_E_PROCESS_ID_NOT_FOUND)
The text was updated successfully, but these errors were encountered: