Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Window»Source Code Browser/View»Browse Identifier

LabWindows/CVI 8.5 Help
November 2007

NI Part Number:
370051K-01

»View Product Info

The Source Code Browser is a cross-reference tool that lists selected files, functions, variables, data types, and macros in a program. You can use the browser to identify how different parts of a program interact with each other. Browse information is available only if the project is in debug configuration. You must enable the Generate source code browse information option in the Build Options dialog box and compile the file to generate browse information.

Note Note  Running the Source Code Browser increases the size of the .cdb file that is generated while in Debug mode. The size of the .cdb file is relative to the number of .c and .h files in the project. For projects with many files, the size of the .cdb can easily reach 50 MB while the Source Code Browser is running.

You can use one of the following methods to access the Source Code Browser:

  • Select Window»Source Code Browser. If you use this method to access the Source Code Browser, LabWindows/CVI creates an unnamed tab in the Source Code Browser.
  • Place the cursor over a filename, function, variable, data type, or macro in the code and press <Ctrl-F1>.
  • Right-click a .c or .prj filename in the Project Tree and select Browse "filename".
  • Right-click in a source file and select Browse Identifier.
  • Select a variable name in the Variables, Watch, Array Display, or String Display window and select View»Browse Identifier.

You can type a substring or the entire name of a file, function, variable, data type, or macro in the Identifier/Filename control of the Source Code Browser to access browse information about all items that match the string. Wildcards are not supported, and the search is not case sensitive. All search matches appear in the Matches found column.

Browsing on Files

If you browse on a file, you can choose from the following items under the Views column. The availability of certain items depends on the type of file selected.

  • Functions—The functions defined in the file. The line number where the function is defined is listed next to the function name. Static functions also are identified next to the function name.
  • Included headers—A hierarchical display of included files in the file.
  • Macros—The macros in the file. The line number where the macro is defined is listed next to the macro name.
  • Modules—The program files in the project.
  • Referencing—A hierarchical list of variables and functions defined in another file that are explicitly referenced in the file. The variables and functions are grouped according to module.
  • Referenced from—The functions and variables defined in the file that are referenced from another file. The variables and functions are grouped according to module.
  • Types—The data types defined in the file. The type and line number where the type is defined are listed next to the type name.
  • Variables—The variables defined in the file. The line number where the variable is defined is listed next to the variable name. Static variables also are identified next to the variable name.

Browsing on Functions

If you browse on a function, you can choose from the following items under the Views column:

  • Definition—The file and line number where the function is defined.
  • References—A hierarchical list of files where the function is referenced.
  • Calling—A hierarchical list of the functions that the function calls and the number of references for each of the called functions.
  • Called from—A hierarchical list of functions that call this function and the number of references for each of the calling functions.

Browsing on Variables, Data Types, and Macros

If you browse on a variable, data type, or macro, you can choose from the following items under the Views column:

  • Definition—A list of files and line numbers where the variable, data type, or macro is defined.
  • References—The files and line numbers where the variable, data type, or macro is referenced.

Accessing Context Menu Items in the Source Code Browser

Each item for which you access browse information is included in a separate tab in the Source Code Browser. You can right-click a tab in the Source Code Browser to access the following context menu items. Where you right-click within a tab and which item you have selected determine which context menu items are available.

  • Go to Source—Highlights the selected item in the Source window.
  • Browse—Opens a new tab that contains browse information for the selected item.
  • Browse in this Tab—Displays browse information for the selected item in the tab in which you right-clicked. This information replaces the current information in the tab.
  • Release Window/Confine Window—Whether the Source Code Browser is in the Window Confinement Region determines which option LabWindows/CVI displays. The Release Window command removes the window from the Window Confinement Region. The Confine Window command confines the window to the Window Confinement Region.
  • Close Tab—Closes the selected tab. If there is only one tab in the Source Code Browser, this option closes the Source Code Browser.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit