Skip to content

Instantly share code, notes, and snippets.

@alatas
Created September 25, 2018 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alatas/f80fffd177d706e8df5f67d659f832c3 to your computer and use it in GitHub Desktop.
Save alatas/f80fffd177d706e8df5f67d659f832c3 to your computer and use it in GitHub Desktop.
Disable Debugger Attach Security Warning via PowerShell
$reg = Get-ChildItem -Recurse -Name privateregistry.bin -Path $env:LOCALAPPDATA\Microsoft\VisualStudio\
$key = $reg.Substring(0, $reg.Length - 20)
reg load 'HKU\VS2017PrivateRegistry\' "$env:LOCALAPPDATA\Microsoft\VisualStudio\$reg"
New-ItemProperty -Path "HKU:\VS2017PrivateRegistry\Software\Microsoft\VisualStudio\$key\Debugger" -Name DisableAttachSecurityWarning -PropertyType DWORD -Value 1 -Force
[gc]::collect()
reg unload 'HKU\VS2017PrivateRegistry'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment