This is a small post but very useful in the sharepoint custom application development.
While debugging your custom code in the SharePoint instead of attaching all worker processes(w3wp.exe) this is the command to attach/identify only the current application specific w3wp process
Command to get the correct w3wp process
C:\wondows\System32\inetsrv\appcmd list wp
Here I have written my custom code on Sharepoint-1122 site and debugging the same. So the processor which attached to this application is 4736(see above fig).
So attach only one process which is associated (like below) instead all
Have a happy debugging..!