I have a class library project done in visual studio 2012.
When building this project, a dll is generated.
This dll is deployed in a machine that is in the local network and is consumed by an application that I have no control (third-party).
Is there any way to debug this dll remotely with visual studio 2012?
For example: Attach the dll and await a call to them from the third-party application, then debug.
Download and install the Visual Studio remote tools on the machine that you are deploying to. https://www.microsoft.com/en-gb/download/details.aspx?id=38184
Run that program on the remote computer
Then launch you visual studio select Debug -> Attach to process -> Choose "Remote" for the transport option and enter the ipaddress or hostname for the qualifier.
All the processes should be listed for the remote machine. Choose the process which is loading your DLL. When the remote program uses your dll then your breakpoints will be hit.
If you receive any errors when attempting to attach to the remote machine your first step should be to restart visual studio. It always breaks for me and restarting visual studio fixes it.