HOW TO DEBUG A PLUGIN IN MICROSOFT DYNAMICS CRM 2015 ONLINE
STEP 1:
Open your SDK folder(plugin tool of CRM SDK 2015 type).
->tools->plugin registration tool->plugin registration application
It opens like this

->double click on that application icon.it opens a window to input your credentials by creating a new connection.
Enter the details of your CRM credentials and step to login.

->Then perform the profile installation process using Install profiler button.
It shows like this


Then you will get the message as profile installed successfully in a dialogue box. click on ok button.
STEP 2:
Register new assembly in the register column by loading the plugin you have created in .DLL format.


Click on register selected plugins button.
->Add the step to the specified plugin you have created.it means on which operation the event have to be fired.


-> Click on register new step button.
->click on start profiling button on your selected step.

After profiling is done, then debug your profile using debug button. While doing it, it asks some profile details that we have to enter.
1)profile
2)assembly location
3)plugin

>>the profile file must be loaded here.
Step to how to load a profile file:
Go to CRM and perform the operations where the plugin have to be fired.
Requirement: Here my requirement is to perform the update operation on a custom entity named employee with some fields. when I want to update eid field then the plugin have to be fired and automatically the insertion of data to be done that I have given in my code.


Now it will generates a log file. Download and save it.
->specify this file path in profile column.
It will externally generates an error.so we have to download the log file while we performing the operations on our CRM. and save that file in a particular area and load this file in the profile area.
>>assembly location is nothing but where the .dll file is saved.
>>the plugin is created automatically by plugin class
Step:3
Open visual studio of your plugin code.
->debug->attach to process.It will opens a pop-up menu. In that
Select the plugin registration tool for that application.


Click on attach button.
Step:4
Go to again plugin registration tool and click on start execution process in the debug column. It will starts the execution of your plugin code.

Finally the.dll file is made for debugging.If any errors arises then
Remove them by using debugging concept.
