1. Set your windows service project as the start up project.
2. Go to Project --> Properties --> Debug section --> set Configuration as "Debug"
3. Go to Project --> Properties --> Debug section --> Check "Enable unmanaged code debugging" checkbox.
4. Go to Project --> Properties --> Debug section --> set required paramenters (to be used in service OnStart())
5. Go to Project --> Properties --> Build section --> set required platform targets (in case of oracle database (oracle.dataaccess.dll), we need to set the platform target as similar to the oracle client version installed in the machine. You can install 32bit oracle client in 64 machine.)