1. Browse the sharepoint site.
2. Use Debug -> Attach to process from the webpart which is kept open in .net env. Choose the w3wp process from the list.
3. When the page which uses the webpart is loaded, we can see the breakpoint hit.
Note, To spot the actual w3wp process which points to the site, we use this,
1. Open a notepad
"C:\windows\system32\inetsrv\appcmd.exe list wp
3. Save the notepad as "WProcess.cmd"
4. Double click the cmd file which will list the port against the process id.