If your Visual Studio instance and your Dynamics 365 instance do not reside on the same server, you will need to ensure that the Visual Studio remote debugging tool is installed in the Dynamics 365 server and that you have the correct privileges to access it.
To install the debugging tool, follow the instructions at https://msdn.microsoft.com/en-us/library/y7f5zaaa.aspx.
In the properties of your Visual Studio project, under Debug, enter the name of the remote server under Use remote machine, as highlighted here:
![](http://images-20200215.ebookreading.net/15/1/1/9781786464170/9781786464170__microsoft-dynamics-365__9781786464170__assets__image_04_024.png)
For more details about remote debugging, check out the following MSDN article: