Remote debugging over TeamViewer

TeamViewer has ability to create VPN.
And we spent some time investigating how to make remote debugging working through it.

  1. Create administrator RemoteDbg on remote machine (Password1)
  2. Create user RemoteDbg on dev machine (Password1)
  3. Start TeamViewer with VPN on both machines
  4. Run PowerShell script to change TeamViewer VPN to work

    # Name: ChangeCategory.ps1 
    # Copyright: Microsoft 2009 
    # Revision: 1.0 
    # This script can be used to change the network category of 
    # an 'Unidentified' network to Private to allow common network 
    # activity. This script should only be run when connected to 
    # a network that is trusted since it will also affect the 
    # firewall profile used. 
    # This script is provided as-is and Microsoft does not assume any 
    # liability. This script may be redistributed as long as the file 
    # contains these terms of use unmodified. 
    # Usage: 
    # Start an elevated Powershell command window and execute 
    # ChangeCategory.ps1 
    $NLMType = [Type]::GetTypeFromCLSID('DCB00C01-570F-4A9B-8D69-199FDBA5723B')
    $INetworkListManager = [Activator]::CreateInstance($NLMType)
    $UNIDENTIFIED = "Unidentified network"
    $INetworks = $INetworkListManager.GetNetworks($NLM_ENUM_NETWORK_CONNECTED)
    foreach ($INetwork in $INetworks)
        $Name = $INetwork.GetName()
        $Category = $INetwork.GetCategory()
        if ($INetwork.IsConnected -and ($Category -eq $NLM_NETWORK_CATEGORY_PUBLIC) -and ($Name -eq $UNIDENTIFIED))
  5. Run TaskMgr.exe using Shift + Right mouse click as RemoteDbg on remote machine
  6. Click “Show all processes” in task manager
  7. Run msvsmon from task manager as admin
  8. Create workspace on dev machine with source code
  9. Add entry to hosts file with remote machine IP address and computer name
  10. Add stored windows credential:
    machine: remote machine
    user: RemoteDbg
    password: Password1
  11. Optionally enable local accounts to open admin shares:

    Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
    Name: LocalAccountTokenFilterPolicy
    Data Type: REG_DWORD
    Value: 1


About mnaoumov

Senior .NET Developer in Readify
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

2 Responses to Remote debugging over TeamViewer

  1. Steve says:

    This is a handy tip to have. Thanks.

  2. Brian Christensen says:

    Thank you so much! Spend so much time trying to make this work

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s