SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

Debugging Custom Extensible STSADM Operations

Being able to write commands that extend the functionality of STSADM is awesome. It is way better than having to write it from scratch to make it represent the same feel of STSADM. I ran into speedbump when i tried debugging my operation line by line. I found that I had to add in the following to the "Debug" tab on the project properties screen.

Start Action -> Start External Program = c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe

Start Options -> Command Line Arguments = -o <operation> -url <url> [plus additional properties that need to be included in your custom command]

stsadm debug scree


Posted 10-09-2007 10:55 AM by dwollerman

Comments

ThemePassion - Best stuff about design! » Debugging Custom Extensible STSADM Operations wrote ThemePassion - Best stuff about design! &raquo; Debugging Custom Extensible STSADM Operations
on 10-14-2007 1:28 AM

Pingback from  ThemePassion - Best stuff about design! &raquo; Debugging Custom Extensible STSADM Operations

Thomas wrote re: Debugging Custom Extensible STSADM Operations
on 04-22-2008 3:25 AM

To get debugging for STSADM custom assemblies to work, you must also copy the .pdb (debug symbols) file to the GAC_MSIL directory in use, e.g:

C:\WINDOWS\assembly\GAC_MSIL\<myAssemblyName>\<version__publickey>

I.e. the directory in the GAC, where your STSADM extension DLL is located.

Otherwise, you will get a warning from VS .NET and your breakpoints will not be hit.

AndersR wrote re: Debugging Custom Extensible STSADM Operations
on 07-03-2008 4:25 AM

You can also add a call to system debugger in the code:

System.Diagnostics.Debugger.Launch();

and

System.Diagnostics.Debugger.Break();

works like a charm  :-)

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.