How to: View Code Definitions

When performing a code reference search, you can locate the definition of a code element that you found in the current program file, if the definition exists. For more information, see How to: Search For Code References.

To view the definition of a code element

  1. Open the program file to the location of the code element.

  2. Double-click the text of the code element to select it.

  3. Right-click to display the shortcut menu, and select View Definition.

You can also call View Definition using the DO (_FOXREF) WITH... command. For more information, see _FOXREF System Variable.

View Definition first searches for other external file references that are in the source file, followed by files in the active project. If multiple code element definitions exist, the Go To Definition window appears so you can select a defintion.

If the definition cannot be found in a file for the active project, View Definition searches other open projects or folders. If the definition is found in one of these locations, the Go To Definition window opens for you to select the correct location. For more information, see Go To Definition Window.

If the code element is user-defined, and the definition is found, Visual FoxPro opens an editing window to the location of the definition. If the item you select is a native Visual FoxPro command or function, the Visual FoxPro Help opens the Help topic for that item. If the item you select is a file name, such as for a #INCLUDE statement or SET PROCEDURE command, Visual FoxPro opens the file.

See Also

© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic