Automatic Switching Between Production and Diagnostic Code

Diagnostic code, both temporary debugging code and persistent instrumentation, creates a recurring tradeoff in software engineering workflows. In-source techniques such as assertions, flags, and logging statements are explicit and easy to edit, but clutter production code. Out-of-source techniques such as runtime instrumentation, build transforms, duplicated branches, and temporary uncommitted changes preserve cleaner source files, but are harder to reason about and maintain, especially in collaborative settings. This thesis presents a framework for automatic switching between production and diagnostic code. The core idea is to maintain a canonical structured representation of each file in metadata and generate two synchronized source-level views: debug-on and debug-off. The approach draws inspiration from two-view editors and OT/CRDT-style structured text representations, but applies those ideas to asynchronous, version-controlled software development rather than rendered document editing or real-time collaboration. The framework was implemented as a local VS Code extension and also as a client-server architecture for broader IDE support. Evaluation through automated tests suggests that the local extension preserves intended views with generally low editing overhead, while the client-server model offers greater portability with increased latency. Overall, this work argues that structured diagnostic switching is a feasible and useful direction for collaborative software engineering tooling.

Authors

Institutions

Publication Details

Journal
UNC Libraries
Published
2026-06-09
DOI
https://doi.org/10.17615/fxvz-5e42
Primary Topic
Advanced Software Engineering Methodologies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automatic Switching Between Production and Diagnostic Code

Jack Huo
UNC Libraries
Advanced Software Engineering Methodologies
article

Automatic Switching Between Production and Diagnostic Code

Jack Huo
article en

Abstract

Diagnostic code, both temporary debugging code and persistent instrumentation, creates a recurring tradeoff in software engineering workflows. In-source techniques such as assertions, flags, and logging statements are explicit and easy to edit, but clutter production code. Out-of-source techniques such as runtime instrumentation, build transforms, duplicated branches, and temporary uncommitted changes preserve cleaner source files, but are harder to reason about and maintain, especially in collaborative settings. This thesis presents a framework for automatic switching between production and diagnostic code. The core idea is to maintain a canonical structured representation of each file in metadata and generate two synchronized source-level views: debug-on and debug-off. The approach draws inspiration from two-view editors and OT/CRDT-style structured text representations, but applies those ideas to asynchronous, version-controlled software development rather than rendered document editing or real-time collaboration. The framework was implemented as a local VS Code extension and also as a client-server architecture for broader IDE support. Evaluation through automated tests suggests that the local extension preserves intended views with generally low editing overhead, while the client-server model offers greater portability with increased latency. Overall, this work argues that structured diagnostic switching is a feasible and useful direction for collaborative software engineering tooling.

UNC Libraries
University of North Carolina at Chapel Hill (US)
Industry, innovation and infrastructure
Openalex Percentile: Top 4%
Advanced Software Engineering Methodologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Automatic Switching Between Production and Diagnostic Code — Jack Huo · UNC Libraries (2026) | TGRS Research Map | TGRS