"How To" Guides > Plugin Debugging
If you have your test installation of FogBugz running on the same Windows machine where you develop, you can use the instructions below to debug your plugin. These instructions assume you have already setup FogBugz and either Visual Studio or Visual C# Express (see A Quick Start Guide ("Hello, world") for instructions).
Note: These instructions apply to the Pro, Premium and Ultimate versions of Visual Studio only as the Express editions lack the ability to attach to a process or do remote debugging.
Debugging Your Plugin Locally
- Open your plugin solution in Visual Studio
- Make sure the Solution Configuration is set to Debug
- Build the solution
- Upload it to FogBugz and hit a page to make sure it is loaded with no errors
- In Visual Studio, under the Debug menu select Attach To Process
Make sure the following is in the Attach To box (you can set it manually by clicking Select...)
- Visual Studio 2005 and 2008: Managed Code
- Visual Studio 2010: change Managed (v4.0) to Managed (v2.0, v1.1, v1.0)
- Select your ASP.NET/IIS process, probably either w3wp.exe or aspnet_wp.exe
- Click Attach, then Attach again in the confirmation dialog
- Right click on a line in your plugin and add a Breakpoint
- Load the appropriate pages in FogBugz to test your plugin
Remote debugging is possible using the Visual Studio remote debugger. See this MSDN article for how to do it in Visual Studio 2005.