Finding Unused Code with Coverage
To run an application in the Code Coverage mode
Choose the newly created configuration in the Select run/debug configuration drop-down list on the toolbar and click next to the list. The URL address specified in the run configuration opens in the browser.
To learn what code was executed during the page load, just load the application and then stop it by clicking on the toolbar, next to , or in the Run tool window. If you need a coverage report for some specific features of your application, trigger these features in the browser and only then click to stop the application.
View the report in the Coverage tool window. The Project tool window shows information about the coverage of files and folders. In the editor, the left gutter shows green markers next to the lines that were executed and red markers next to those that were not. You can also hover over the line markers and see how many times each line of code was hit.