Edit and debug content created in the Designer

This scenario deals with cases where you created a form using the Designer tab of the Display Editor in the Proficy Client.

Before you begin

Procedure

  1. Create the form.

    This is done using the Designer tab of the Display Editor.

  2. Make the .PDB files available to the Client for debugging.

    The .pdb file for the form in this scenario can be found at My Documents\Proficy Workflow\UI Projects\<formName>\bin\Debug\.

    Making the .pdb files available for debugging can be done in one of 2 ways:
    • Copy the .pdb files that correspond to the form assembly and dependencies to the My Documents\Proficy Workflow\UI Assemblies\ folder on the machine on which you want to debug the form.
      • When you are finished debugging the form and are ready to run in production again, delete these files from the My Documents\Proficy Workflow\UI Assemblies\ folder; otherwise, the symbol information will continue to be loaded each time the form is loaded.
    • Add the .pdb files as additional files in the Display Editor in the Workflow client. This automatically copies the file to the My Documents\Proficy Workflow\UI Assemblies\ folder for all machines when they try to load this form.
      • When you are finished debugging the form and are ready to run in production again, remove this as an additional file in the Display Editor. Be aware that this file will remain on any client machines that have already downloaded it, so you must also manually delete the file from the My Documents\Proficy Workflow\UI Assemblies\ folder. Otherwise, the symbol information will continue to be loaded each time the form is loaded.
  3. Keep the source code local.

    In the Designer, click the Project tab. Right-click the top node, which is labeled with the project name, and then select Delete local copy of this project when Editor is closed. This keeps the source code on this machine in order to enable debugging scenarios. Otherwise, the local copy of the source code is automatically deleted when you close the Display Editor.

    The project is generated as a folder on the Client machine under <Logged in user> \My Documents\Proficy Workflow\UI Projects\AdjustTextSize. This folder can be downloaded onto the Proficy Client machine by opening the Client and loading the form into the Display Editor.

  4. Open the project code using Visual Studio.

    Open the code files you want to debug into and set your breakpoints by clicking in the extreme left margin. Putting a breakpoint in the constructor of your form is a good idea in order to test a breakpoint being hit.

  5. Launch the Workflow client if it is not already running.
  6. In the Debug menu of Visual Studio, select Attach to Process, and then select ProficyClient.exe.

    Alternatively, if you want to debug the form from within the Display Editor while you are testing it, you can attach to FormTester.exe. This process appears only while a test is in progress.

  7. Load the form in the client.

    Generally, you will do this by running a workflow that has this form specified in a form activity. When the form is loaded into the Task List on this machine, you should see your breakpoints being hit in Visual Studio. Alternatively, you can select the form in the navigator, and open it in the Global Viewer. However, in this case no parameters will be passed into your form as they may be from a workflow.

  8. Stop debugging.

    Debugging this form should provide some information about what is going wrong. Before you make any changes, however, you must first stop debugging. Use the Debug menu in Visual Studio to stop debugging, and then make your code changes, save your changes, and recompile.

  9. Reload the assembly and source.

    Even though you have rebuilt the form locally, the changes have not been saved yet to the Proficy system. To do this, you must first open the form in the Display Editor and click the Designer tab. A prompt appears informing you that the source code saved for this form is different than the files on disk. Select No so that your local changes will be used and not overwritten. Your modified project is now loaded in the designer.

  10. Save your changes to the server.

    To save these source code files to the server, click the Save button on the title bar (in the upper right corner). If the Save button is not enabled, make a minor modification to the project to trigger an indication that it requires saving. Also, if you had added any additional files (including .pdb files), make sure you remove and re-add these to reflect the latest versions, and then save these changes, as well. If you had not specified .pdb files in this manner and had only manually copied them to the folder, you must copy them again to the My Documents\Proficy Workflow\UI Assemblies folder.

    You can now test the new version of your form to verify that your changes have fixed the issue or go back to Step 4 to debug further.

  11. Remove the symbol files.

    When you are finished debugging, review Step 2 for instructions on removing the .pdb files when they are no longer needed.