Ashish
Ashish

Reputation: 363

Get prompt for entering Credentials which Attaching Process in Visual Studio 2012

While I am attaching to a process for remote debugging in Visual Studio 2012, it uses my default system credentials. I want the debugging to be done in context of other user, for which I should get a prompt to enter new credentials. What settings/configuration I need so that I get that prompt for inputting credentials?

I tried clearing all the passwords stored in Windows Credential Manager and tweaking some settings in VS but it did not work.

Upvotes: 1

Views: 5205

Answers (2)

Dismantled
Dismantled

Reputation: 23

Faced the same problem with Visual Studio Remote Debugger 2019 (x64). Starting the Remote Debugger with "allow" username command parameter for user who start VS2019 and attach to the remote process helped me.

"C:\Tools\Remote Debugger 2019\x64\msvsmon.exe" /allow username

Upvotes: 1

Maria
Maria

Reputation: 858

You can see more info here on how to set up remote tools: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx Gregg's blog is very useful for account requirements: http://blogs.msdn.com/b/greggm/archive/2008/05/15/visual-studio-remote-debugger-service-user-account-requirements.aspx

You really want two local user accounts, one on host and remote host, with the same username and password (to have Visual Studio authenticate using a local account that matches a remote account (username and password) that has been given permissions to debug in msvsmon.exe)

About Windows cached credentials - if you accessed a resource and checked “remember me”, Windows cached credentials to that resource. If you ever attempted to Attach To Process using the current user logged into the local machine, Visual Studio will pick up these cached credentials and attempt to use this as authentication for remote debugging.So you’ll need to clear these credentials (control userpasswords2, Advanced tab, Manage Passwords, Delete the credentials for that remote host)

Now you can either attempt to access the resource (like a share) using a different credential and store it, or you can run Visual Studio as that user you want to debug with that corresponds to the user on the remote side.

Upvotes: 0

Related Questions