If debugging with Visual Studio and attaching to a process your PC slows to a crawl, try this:
Super+R regedit
go to HKEY_CURRENT_USER\Control Panel\Desktop and
find LowLevelHooksTimeout parameter (or create one, it's a REG_DWORD)
usually it's set to like 5000 ms, so change to 10.
Unfortunately this doesn't seem to work with Windows 10.