Skip to content

Measure & track technical debt

"Technical debt" isn't one number — it's the accumulated cost of shortcuts, complexity, and rule violations that make future change slower. Understand gives you concrete, repeatable proxies for it, and — because they're just metrics — you can watch them move over time.

1. Read the built-in Technical Debt grade

The Home dashboard has a Technical Debt card (shown when the project is licensed for CodeCheck). Its grade is a violation density — CodeCheck violations ÷ lines of code (the CCViolDensityCode metric) — broken down by severity, with the most frequent violations and the files carrying the most.

It's a density, not hours or dollars

Understand's Technical Debt score is a ratio, not a time- or money-to-fix estimate. Treat the letter grade as a conversation starter — the way to move it is to fix or triage violations in the Violation Browser.

The Function Complexity grade (average Cyclomatic Complexity) on the same dashboard is the other half of the picture: complex code is debt you pay on every future edit.

2. Add a Maintainability Index (Halstead plugin)

If your process wants a composite Maintainability Index, Understand's Halstead metric plugin provides one (HalsteadMaintainIdx) alongside the full Halstead suite — Volume, Difficulty, Effort, and so on (also available as the Halstead Metrics report). Enable it from the Plugin Manager; the metric then appears per entity in the Metrics Browser like any built-in metric, and can be exported or used to color a treemap.

For a house-specific debt score, you can also write your own metric plugin.

3. Track it over time

A single reading isn't debt management — the trend is. Keep a baseline and watch the numbers move:

  1. Set an earlier release as a comparison database. With one open, Understand computes a Diff-prefixed metric for any existing metric — DiffCyclomatic, DiffCountLine, and so on — plus PercentChanged, so you can see how a function's or file's metrics moved since the baseline right in the GUI, without exporting anything.
  2. For a longer history than one comparison, export the debt-relevant metrics on every build with und metrics and archive the CSVs — see Export & track metrics over time. The Entity_Uniquename column lets you follow a single function across runs.
  3. Chart CCViolDensityCode, average Cyclomatic, and (if enabled) HalsteadMaintainIdx per tag or nightly run.

4. Turn it into a backlog

Rank the worst offenders and act on them — the dashboard's "Most Complex" cards and the risk views jump you straight to the units that cost the most. A large share of many projects' debt is dead code.

5. More technical-debt plugins

The plugin library's Solutions collection has more angles on quality and debt beyond the built-ins: Project Quality (grades a codebase by comparing it to similar projects, using published dependency-network research), and Git (debt signals from version history — authors, churn, and coupling).

Where to next