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.
Pop up window for setting the unique TCP/IP Port Number will appear on screen,
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,
On pop up of the VS remote debugger window Go ->Tools ->permissions, add the username of the Dev server administrator account ->Click Apply ->Ok.
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,
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.
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:
- Create a console application in visual studio code
- Debugging PowerShell Script with Visual Studio Code
- jQuery Tooltip using Visual Studio
- How to debug custom web part and timer job in SharePoint 2013 using Visual Studio
- SharePoint 2010 development with Visual Studio 2010
- SharePoint Workflow Initiation Form template missing in Visual Studio
- Cannot cast LValue expression to type Microsoft.Activities.DynamicValue error in visual studio workflow in SharePoint
- SharePoint online visual studio 2015 workflow variable not available in various scopes
- The ExpressionTranslationBuildTask task failed unexpectedly SharePoint Visual Studio Workflow Error
- Create a console application to work with SharePoint Online using visual studio
This SharePoint tutorial, we discussed how to do remote debugging sharepoint 2013 solutions.
Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.