Editor Quick Action: Remove or Comment Out Dead Code

You can use this quick action to either remove or comment out a blick of code which , a section or paragraph name, or an identifier in a file or in the entire solution:

  1. Open your source file in the editor.
  2. Right-click in the editor and click Code Analysis > Dead Statements to perform a dead code analysis.

    If there are any dead statements in your code, they are reported in the Micro Focus Code Analysis window.

    The editor displays a light bulb icon (light bulb) in the margin on the line that has the unused statements.

  3. Click on the downward arrow next to the light bulb icon and click on the Remove dead code block action to remove the code.