SharePoint custom application remote debugging in Visual Studio

This SharePoint tutorial, we will discuss how to remote debugging in SharePoint custom application using Visual Studio (SharePoint Test sever to Dev Server).

An application works completely fine in the SharePoint Dev environment but fails to work in the test environment. Then, how do we find out the issue in the test environment and make the application work?

Verify whether the GAC manager tool is installed or not. If it’s not, then install GAC Manager.

This problem can be resolved using the remote debugging method. The step-by-step procedure is given to resolve the issue.

SharePoint custom application remote debugging in Visual Studio

Connect to Test Server ->Find Remote Debugger, right click and run as an Administrator.

Sharepoint Test Environment Remote Debuging

Pop up window for setting the unique TCP/IP Port Number will appear on screen,

SharePoint custom application remote debugging in Visual Studio

If Remote debugger icon does not appear on the desktop then follow the below steps for remote debugger configuration.

Open Windows Explorer and navigate to the following directory – C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Remote Debugger.

Once you’re in the Remote Debugger directory, double-click on the appropriate directory name based on the processor of your web front-end server (i.e. x64 is most likely what you’ll choose if you’re working with SharePoint 2013).

Double click on the msvsmon file,

remote debugging sharepoint 2010 solutions
remote debugging sharepoint 2013 solutions

On pop up of the VS remote debugger window Go ->Tools ->permissions, add the username of the Dev server administrator account ->Click Apply ->Ok.

remote debugging sharepoint 2019 solutions

Run with Administrator open GAC Manager Tool- -> Click following + Icon Add your custom solution DLL into GAC Manager -> reset IIS by opening a command prompt by typing “iisreset,

remote debugging sharepoint 2016 solutions

SharePoint Dev Environment Steps

These final steps of the process will now allow you to connect your instance of Visual Studio with the remote debugging monitor so that you will, at last, be able to step through the C# code of your SharePoint components.

On your workstation, open Visual Studio.

Open your SharePoint site’s code solution file.

Once your solution is loaded, open the appropriate .cs file you wish to debug and place your breakpoint(s).

Click Debug -> Attach to Process.

emote debugging sharepoint 2016
remote debugging sharepoint 2019

For Qualifier, update the textbox with the remote debugging server name that you captured in Test Environment Step 3 of the Activate the Visual Studio Remote Debugging Monitor section.

Select the w3wp.exe process that matches the ID that you recorded in Step 5 of the Dev Environment to Obtain the Worker Process ID section.

Click the Attach button.

Refresh Test Environment SharePoint application then the debugger will be activated in SharePoint Dev Environment.

You may like following visual studio tutorials:

This SharePoint tutorial, we discussed how to do remote debugging sharepoint 2013 solutions.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

Sagar Pardeshi

I am Developer working on Microsoft Technologies for the past 6+years. I am very much passionate about programming and my core skills are SharePoint, ASP.NET & C#,Jquery,Javascript,REST. I am running this blog to share my experience & learning with the community I am an MCP, MCTS .NET & Sharepoint 2010, MCPD Sharepoint 2010, and MCSD HTML 5,Sharepoint 2013 Core Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.

>