AL EventLens 0.1.6: the handler lens, and a fix that needed fixing
AL EventLens 0.1.6 for VS Code adds a CodeLens over test handler functions that shows how many tests use each handler, or marks it unused, so dead handlers are easy to spot. The release also has ten fixes, mostly parser bugs that silently dropped or invented events, plus index, reveal and command palette fixes. It also describes how a review caught a regression introduced by one of those fixes.
Read it hereOpen in Claudehttps-www-dvlprlife-com-2026-07-al-eventlens-0-1-6-the-handler-lens-and-a-fix-that-needed-fixing--1510616044.md

post DvlprLife.com
"A handler no test uses is dead test code, and it accumulates: you delete the test, you leave the handler."
Key points
- Handler lens shows test usage counts above handler functions such as MessageHandler, ConfirmHandler and PageHandler, or marks them unused
- Counting is scoped to the declaring test codeunit, so the lens needs no index and works as soon as a file opens; it has its own enable setting
- Parser fixes cover apostrophes in directive text, attribute names inside strings, unclosed EventSubscriber attributes and quoted parameter names with colons
- Non-parser fixes cover index loss on save, Reveal Subscriber selecting nothing, wrong cursor line and argument-only commands in the palette
- A differential harness comparing old and new parsers found that the directive fix let trailing comments create fake publishers
Quotes
- “A handler no test uses is dead test code, and it accumulates: you delete the test, you leave the handler.” (Explains the core problem the handler lens solves - orphaned handler functions that persist after test deletion and clutter codebases)
Context
- Features: Handler CodeLens, Test handler usage tracking, Parser bug fixes, Unused handler detection, Subscriber reveal
- Versions: 0.1.6
Source: DvlprLife, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.