Debugging custom forms and console tasks in Service ManagerBy
When customizing Service Manager you might want to create a custom form for a custom class. You’ll probably end up with some code behind for some fancy stuff interacting with the form. Maybe you want to list data from a remote data source? When dealing with scenarios like this it’s always nice to be able to debug your code. Here are the steps you need to go through to be able to debug a custom form or a custom console task (a task in the ”Task pane”) from within Visual Studio.
- In the code behind, add suitable breakpoints.
- Make sure that you’ve configured the build procedure to use “Debug” mode by opening the “Configuration Managerâ€¦” and choosing the “Debug” option in the “Configuration” drop down.*
*If you don’t see the “Configuration Managerâ€¦” menu item. Enable it by going into “Tools” â€“ “Options”, under “Projects and Solution” â€“ “General” you check the “Show advanced build configurations” and click OK.
- Build your debug assembly files by clicking “Build” â€“ “Build Solution” in the menu.
- Go to the “Debug” output directory of your project. Copy the assembly file (.dll) and the program debug database file (.pdb) containing your form and debugging information.
- Paste the files into the Service Manager install directory (normally “C:\Program Files\Microsoft System Center\Service Manager 2010″) on your Service Manager server.
- Open the Service Manager console.
- In Visual Studio go to “Tools” â€“ “Attach to Process” and select the process called “Microsoft.EnterpriseManagement.ServiceManager.UI.Console.exe” and click “Attach”.
- You’re now ready to debug your custom form or task. Open up your custom form or click your custom task within the console and you should hit your break points within Visual Studio.