A newer version of this page is available. Switch to the current version.

Debug Scripts in Visual Studio

This topic describes how to use the Visual Studio debugger to validate scripts in the End-User Report Designer. Visual Studio Express editions do not support this feature because they do not provide the Attach to Process option.


Report scripts are not secure. We recommend that you use expression bindings instead.

Do the following to debug scripts in Visual Studio:

  1. Open the configuration file of the application that contains the End-User Report Designer and add the <system.diagnostics> section as shown below:

    <?xml version="1.0" encoding="utf-8"?>
          <add name="AllowDebugXtraReportScripts" value="BreakWhenDebuggerAttached"/>
  2. Run this application.

  3. Start Visual Studio and select Debug | Attach to Process in the toolbar.


  4. Select your running application in the invoked Attach to Process dialog.


  5. Return to the application with the End-User Report Designer and switch to the Preview tab. This opens the temporary generated class with all report elements and script code in Visual Studio. You can then debug the script code (for instance, use breakpoints).


    You can find this temporary created file in the following directory: C:\Users\User_Name\AppData\Local\Temp.


See Also