Share via


How to Debug Pipeline Components

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

This topic describes how to set up for debugging a Commerce Server pipeline component that you have written.

To set up for pipeline component debugging in Visual Studio 2005 or Visual Studio 2008

  1. After building a debug version of your pipeline component, make sure to specify the path to your symbol file. For more information about setting the locations in which Visual Studio 2005 or Visual Studio 2008 will look for symbol files, see https://go.microsoft.com/fwlink/?LinkId=65101.

  2. Optionally, enable ASP.NET debugging within Visual Studio. You should perform this step if you want to be able to debug your site code as well as your pipeline component in this debugging session. For more information about enabling ASP.NET debugging, see https://go.microsoft.com/fwlink/?LinkId=65097.

  3. In Visual Studio 2005 or Visual Studio 2008, on the Tools menu, click Attach to Process. The Attach to Process dialog box opens.

  4. Select the ASP.NET process (w3wp.exe) from the Available Processes list and click the Attach button.

    Note

    If you do not see the w3wp.exe process in the list, select one or both of the boxes Show processes from all users and Show processes in all sessions.

  5. If necessary, make sure that the Attach to selection matches the type of your source code (native versus managed).

  6. Click OK to attach to the ASP.NET process and dismiss the Attach to Process dialog box.

  7. In Visual Studio 2005 or Visual Studio 2008, on the File menu, click Open, and then click File. The File Open dialog box opens.

  8. Browse to the source code for your pipeline component, select it, and then click Open. Your pipeline component source code file opens in Visual Studio. 2005.

  9. Insert a break point at the IPipelineComponent::Execute Method method.

  10. Open Internet Explorer and browse to the page in your site that contains the code that will cause the pipeline that contains your component to run. Visual Studio 2005 or Visual Studio 2008 will activate and your pipeline component will be stopped at the line where you placed the break point.

  11. Step through your code and debug it using the variety of debugging functionality provided by Visual Studio 2005 or Visual Studio 2008.

See Also

Other Resources

How to Build Pipeline Components Using C#

Building Pipeline Components