Attach to Process

Studio lets you debug a project running in a separate process such as Citrix or Runtime. When you attach to the external process, Studio opens the solution. You can add break points and watches to items on an automation and then following the generated debugging information. For more information, see Citrix - Server Side Debugging.

Note: Debugging across a context boundary is not supported. You cannot debug an automation which is added under a Citrix, Process, or Local context.

To enable attaching to a process, you must add a key to the user's RuntimeConfig.XML file, in the AppSettings section:

<add key="EnableRemoteDebugging" value="true" />

Restart Studio after making changes to the RuntimeConfig.xml file.

These steps show how to use Attach to Process to debug a project running locally in Runtime.

  1. Create a simple solution containing a Windows form.

  2. On the Windows Form add a button, text box, and label.

  3. Add an automation to the solution and connect the components. Save the solution.

  4. Deploy the solution to a local folder and then close Studio.

  5. Modify the RuntimeConfig.xml file in a text editor by adding this key to the AppSettings section of the file.

    <add key="EnableRemoteDebugging" value="true"/>

  6. Save and close the RuntimeConfig.xml file.

  7. Start Runtime and load the project you just deployed.

  8. Start Studio and load the project you just deployed.

  9. Select the Debug > Attach to Process option. The Attach to Process  window is displayed.

  10. Make sure OpenSpan code is selected in the Attach to field. If not, click the Select button and check the OpenSpan option on the Select Code Type dialog and then click OK. Here is an example.

  11. Highlight the process and then click the Attach button. You will receive notification of a successful attachment. Click OK.

  12. Return to the solution in Studio. From here you can add breakpoints and watches to the solution. When you run the Runtime project, you will see the debugging information display on the Debugging tabs in Studio. Note that you cannot run the solution from Studio.

To detach from a process, go to the Debug menu and select the Detach option. You will receive notification of successful detachment. Click OK.

After detaching from a process you will be able to run the solution locally through Studio.

 


Privacy | Trademarks | Terms of Use | Feedback

Updated: 18 June 2020

© 2016 - 2020 Pegasystems Inc.  Cambridge, MA All rights reserved.

 

OpenSpan data classification label