You are here: AxTools > CodeSMART 2007 for VB6 > Documentation > User's Guide > Code Analyzer > Analyzing Code
While browsing this page, why not start downloading the evaluation setup kit (direct download, no questions asked).

Analyzing Code

The CodeSMART Code Analyzer can be used to determine possible problems in Visual Basic code. It can determine dead variables, statements that can slow down your code or situations that can generate problems.

To analyze Visual Basic code:

  1. Open the project you want to analyze.
  2. Optional. Select a component or a procedure if you want to narrow down the operation scope.
  3. In the CodeSMART main menu, select the Code Analyzer entry from the Reviews popup, or click the same button from the Other Tools toolbar to display the Code Analyzer dialog-box (quick toolbar and menu references are available).
  4. Code Analyzer
  5. Specify the operation scope. Depending on the current position in code and the active code or designer window, only valid options are listed.
  6. Check Detect unused symbols and dead code if you want CodeSMART to detect and report dead code.
  7. Specify if you want CodeSMART to list speed optimization suggestions, if applicable.
  8. Check Report potential problem sources if you want CodeSMART to detect and report situations which can lead to problems (for example procedures with no error handling code).
  9. You may review in detail the settings for the above categories by clicking the corresponding link control.
  10. Press Begin to perform the code analysis. Once the operation is finished the results are displayed into the Reviews pane on the Enhanced Immediate window.
    Code Analyzer Pane
  11. Each item in the Reviews pane contains all the data needed to locate the faulty code and (if applicable) a suggestion on how to solve the reported problem. You can double click an item to go directly to the code location that corresponds to the accused problem..

 Notes

  • If you want to avoid any kind of reports being made for a certain component, then you should place the CodeSMART 'CSCA: Skip comment marker inside that component general declaration area (available through the main menu).
  • The results in the list can be refreshed, deleted, printed, exported and the pane view can be customized all using the pane's shortcut menu commands.
See also
Code Analyzer Overview
Dead Code Detection
Slow Code Detection
Potential Problems Detection
Collection Classes Options
Other Options

Back To Top

Copyright © 2008 AxTools - CodeSMART 2007 for VB6 - Code Analyzer