Find text in the Source view

Use highlighting and the Find action to locate specific text in the Source view—such as variable names, function calls, or substrings—and move between each occurrence.

Both methods are useful for finding text, but the Find action has several advantages over simple highlighting, including the following: 

  • Next and Previous buttons that can save you tedious scrolling.

  • The ability to search for partial strings such as eval instead of evaluate.

  • Case sensitive searching.

  • Continuation of the current search if you move to another file in the Source view.

Highlighting and the Find action operate on the contents of the currently active Source view. They do not search across all files at once.

Highlight all occurrences of a string

Use highlighting when you want an immediate view of all matches for a specific string.

  1. Click a continuous string in the Source view to highlight that string and all matching occurrences in the current Source view.

  2. Scroll to review every occurrence of the string.

    Source view with string highlighting

To clear highlighting, click in any empty space in the Source view.

Use the Find action

Use the Find action when you want to step through matches and refine the search.

  1. Optionally select the text you want to search for.

    If you select text in the Source view before you start the Find action, TotalView loads the selected text into the Find text box automatically.

    Screenshot of selected text in the Source view results in Screenshot of the selected text in the Source view being applied to the Find text box

  2. Open the Find panel by using one of the following methods:

    • On the menu bar, click Edit > Find.

    • Press Ctrl+F.

  3. In the Find panel, verify the search text or type a new string to search for. The Source view highlights the matching strings and the Find panel displays the total number of matching strings found.

    Source view with string highlighting being shown for the Find search results

  4. Move between matches using one of the following methods:

    • Click Next Source view Find panel's Next button or press Ctrl+G to move to the next occurrence.

    • Click Previous Source view Find panel's Previous button or press Ctrl+Shift+G to move to the prior occurrence.

  5. (Optional) Refine the search as follows:

    • Click Case Sensitive Source view Find panel's Case Sensitive button to match letter case.

    • Click Whole Word Source view Find panel's Whole Word button to match only complete words.

  6. (Optional) Click Wrap Search Source view Find panel's Wrap Search button to continue searching from the beginning of the file after the last instance.

To close the Find panel, press the Esc key or click Close Source view Find panel's Close button at the right end of the panel.

Search strings are saved between debugging sessions, as is the state of the Case Sensitive and Whole Word buttons. To select a previous search string, in the Find field, click the down arrow.