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:
-
Open the project you want to analyze.
-
Optional. Select a component or a procedure if you want to narrow down
the operation scope.
-
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).
-
Specify the operation scope.
Depending on the current position in code and the active code or
designer window, only valid options are listed.
-
Check Detect unused symbols and dead code if you want CodeSMART to detect
and report dead code.
-
Specify if you want CodeSMART to list speed optimization suggestions,
if applicable.
-
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).
-
You may review in detail the settings for the above categories by clicking the corresponding
link control.
-
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.
-
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 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
Back To Top
|