Runtime State Transition Logging for Asynchronous Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging in modern software development is challenging due to asynchronous programming, where the origin of code issues is often unknown at the time of execution, especially in multi-threaded environments, making it difficult to diagnose and troubleshoot runtime artifacts such as callbacks and DOM elements, which lack available information for inspection.

Innovation Solution

A method is introduced to associate diagnostic information with the origin of runtime artifacts by logging state transitions during execution and providing diagnostic information, such as call stack frames, for retrieval at breakpoints or exception throws, allowing developers to trace back the root cause of problems through data structures and tools.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If asynchronous programming is used to enable concurrent execution and improve productivity, then productivity is improved, but debugging capability deteriorates because the origin of code issues becomes unknown at the time of execution

Engineering Contradiction:
Improveconcurrent execution capabilityVSAvoiddebugging difficulty
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies preliminary action by logging state transitions and diagnostic information (such as call stack frames) during runtime before issues manifest. This creates a historical record that can be retrieved later at breakpoints or when exceptions are thrown, allowing developers to trace back the origin of problems in asynchronous operations without interrupting concurrent execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary logging mechanism that captures and stores diagnostic information about state transitions in asynchronous operations. This intermediary layer preserves the connection between runtime artifacts (callbacks, DOM elements) and their origins, enabling developers to trace back through the asynchronous call chain even when the original context is no longer available.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If traditional debugging methods are used to inspect code at breakpoints, then debugging capability is maintained, but diagnostic information is lost due to asynchronous operations popping information from the call stack

Engineering Contradiction:
Improvedebugging operationVSAvoidcall stack information loss
Core Design Contradiction:
Ease of operationVSLoss of information

Solution Approach 1:

The system performs preliminary logging of call stack frames and diagnostic information during runtime, storing them in a data structure before asynchronous operations complete and pop the stack. This preserved information becomes available for retrieval at breakpoints, eliminating the information loss that normally occurs in asynchronous debugging.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates copies of diagnostic information (call stack frames, state transition data) and stores them in a persistent data structure. These copies serve as replicas of the original runtime state, allowing developers to inspect information that would otherwise be lost when asynchronous operations complete and return from the call stack.

Inventive Principle:
Principle #26Copying

3Adaptability or versatility

If developers implement new software with advanced development technologies to improve adaptability, then adaptability is improved, but debugging costs increase significantly

Engineering Contradiction:
Improveplatform adaptabilityVSAvoiddebugging complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal logging mechanism that works across different programming paradigms (synchronous and asynchronous operations, callbacks, DOM elements). This multi-functional approach provides consistent diagnostic information regardless of the specific development technology or platform being used, reducing debugging complexity while maintaining adaptability to various programming models.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentEP2972881B1Diagnostics of state transitions
Publication Date: 2022.07.27 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2972881B1 patent drawingFigure 1
  • EP2972881B1 patent drawingFigure 2
  • EP2972881B1 patent drawingFigure 3

AI summary

A method for diagnosing computer readable instructions related to transfers of control is disclosed. A state transition of a unit of execution within a logical operation is logged during runtime of the computer readable instructions. Diagnostic information of the logical operation is associated with the state transition. The state transition and associated diagnostic information is provided for retrieval at a selected point in the computer readable instructions.