Wing will not allow attach/detach functionality unless it has available to it a password that can be used to control access. This is important because an unsecured debug server provides the client (Wing IDE) full control of the host machine via the Debug Probe tool. Any Python command can be executed in this way, including programs that compromise the security of your machine and network.
Because Wing sets up an access control password during installation, attach and detach will work out of the box as long as your debug processes are launched from Wing IDE, by you from the command line, or in the context of some service or program that is running under your user name on a machine that has access to your User Settings Directory.
If you plan use wingdbstub to debug remotely or as a different user running on the same machine as the IDE, you will also need to copy the file wingdebugpw from your User Settings Directory into the same directory as wingdbstub.py.