Additional Debugging Information

General Debugging Tip

VuGen can be used as a regular text editor. You can open any text file in it and edit it. When an error message is displayed during replay in the output window below, you can double click on it and VuGen jumps the cursor to the line of the test that caused the problem. You can also place the cursor on the error code and press F1 to view the online help explanation for the error code.

Back to top

Using C Functions for Tracing

You can use the C interpreter trace option (in version 230 or higher) to debug your Vuser scripts. The ci_set_debug statement allows trace and debug to be turned on and off at specific points in the script.

ci_set_debug(ci_this_context, int debug, int trace);

For example, you could add the following statements to your script:

ci_set_debug(ci_this_context, 1, 1) /* turn ON trace =; debug */
ci_set_debug(ci_this_context, 0, 0) /* turn OFF trace =; debug */

Back to top

Additional C Language Keywords

When you run a C script in VuGen, its parser uses the built-in C interpreter to parse the functions in the script. You can add keywords that are not part of the standard parser's library. By default, several common C++ keywords are added during installation, such as size_t and DWORD. You can edit the list and add additional keywords for your environment.

Back to top

Add Additional Keywords

  1. Open the vugen_extra_keywords.ini file, located in your machine's <Windows> or <Windows>/System directory.

  2. In the EXTRA_KEYWORDS_C section, add the desired keywords for the C interpreter.

    The file has the following format:

    [EXTRA_KEYWORDS_C]
    FILE=
    size_t=
    WORD=
    DWORD=
    LPCSTR=
    

Back to top

Examining Replay Output

Look at the replay output (either from within VuGen, or the file output.txt representing the output of the VuGen driver). You may also change the runtime settings options in VuGen to select more extensive logging in order to obtain a more detailed log output of the replayed test.

Back to top