Debugging SharePoint features isn't easy.
While we are runing a SharePoint site within a browser, several SharePoint processes are running simultaneously.
The trick is to find out what specific SharePoint process (w3wp.exe) is being used by the site we are viewing. This way we can attach the process to Visual Studio, add breakpoints to the project and debug the solution.
This is an additional feature that allows you to know the specifid PID of the SharePoint process that is running, and also lets you attach it to open solutions.
SharePoint Features @ Codeplex
Look for Debugger Feature (separate download)