Previewing and Debugging Form Templates on InfoPath Forms Services

To debug business logic for browser-enabled forms deployed to InfoPath Forms Services from Microsoft Visual Studio 2005 with Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System, you must manually attach the debugger to the server process (w3wp.exe) and follow a similar process to that used for debugging Web Parts or ASP.NET applications.

Business logic code for a browser-enabled form template is deployed and loaded on the server from one or more assemblies. The following information assumes that you are using a standalone installation that has a single Web front-end and that you have opened an interactive session as an Administrator. Remote debugging is also possible by following the guidelines for Remote Debugging Setup and then following the procedures described in the topic How to: Debug Browser-Enabled Forms Deployed on InfoPath Form Services, available in the Help installed with Microsoft Visual Studio Tools for Applications (VSTA) and Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System.

Procedures

To Preview the Form in the Target Publish Domain

  1. In InfoPath design mode, click Form Options on the Tools menu.

  2. In the Form Options dialog box, select the Preview category.

  3. In the Domain section, type in the domain in which the form template will be deployed.

When you preview the form it will behave as if it is published in the domain you entered. This is especially useful if your form template's security level is Domain and you have one or more data connections to other domains.

Preview an Administrator-Approved Form Template

Form templates that contain custom form code must first be deployed by a server Administrator before they can be viewed in a Web browser.

Follow the steps in the Developing and Deploying Form Templates for InfoPath Forms Services topic for deploying a form template containing code.

Debug an Administrator-Approved Form Template

You can debug a form template at deployment or during runtime. For more information about debugging form templates, see How to: Debug Browser-Enabled Forms Deployed on InfoPath Form Services, available in the Help installed with Microsoft Visual Studio Tools for Applications (VSTA) and Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System.