Code coverage for applications

Track code execution and identify dead code effectively

Code coverage enables you to see exactly what parts of your code are executed during single or multiple runs. It's an invaluable asset for detecting dead code, ensuring that every line of your code serves a purpose.

  • Detailed Execution Insights: track which parts of your code are being used and which are not during execution.
  • Dead Code Detection: easily identify and remove code that is never executed, streamlining your application.

Click the run icon in the gutter and select Run <run/debug configuration name> with Coverage. For additional options to run code coverage, refer to Running with coverage.

Code coverage for applications

New in 2023.3

Related Resources

Detect Incorrect Usages of t/b.Fatal* Calls in Goroutines
Detect Incorrect Usages of t/b.Fatal* Calls in Goroutines
Find if tests or benchmarks are using t/b.Fatal* calls inside goroutines incorrectly
Live Template to Create a for Loop
Live Template to Create a for Loop
Benchmark loops are repetitive, so let the IDE handle this for you.
Live Template to Write Benchmark Functions
Live Template to Write Benchmark Functions
Write benchmarks quicker thanks to the builtin bench live template.