Q: How to debug a class library on a SharePoint 2013 Server? I am learning to create a forms-based authentication for claims-based web application using custom membership and role provider based on the [msdn][1] link 
I will be building a class library to implement a custom authentication solution.
This is the first time experience for the creation of class library. Please let me know how could I debug and troubleshoot the issues in the project.
I'm trying to follow this guide in creating a Forms-Based Authentication for Claims-Based SharePoint 2010 Web Applications Using Custom Membership and Role Providers.
https://msdn.microsoft.com/en-us/library/office/gg317440(v=office.14).aspx
from what i understand, the dll, when compiled and put into the GAC will be called by the web.config file in the central administration, web application and Security Token Service when user is trying to login or when the people picker is searching for the user. i want to know how do i set up a debugging mode so that i will be able to step through the code? do i need to create a blank SharePoint project and add the class files inside to deploy the solution first? Where do i deploy the solution to anyway?

A: In order to deploy your project from Visual Studio, go to the Solution Explorer and right click on the name of the project as shown below.

Click the Deploy Solution button to deploy the project.
Once your project is deployed, go to the page for which you have coded on the browser. 
Once this is done, go to the visual studio. Select Debug menu. In this menu select Attach to process. There will be a popup that will display several processes. Select add the w3wp processes available and click the attach button. Place debug points as per needed.
Now,go to the browser and perform the actions like button click. When the relevant action is taken, the debug point will be hit in the visual studio and you will be able to debug it.
