Tentative Code Execution in Debuggers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging software applications often requires significant time and effort to reproduce and localize source code bugs, as developers need to manually observe and alter program execution to identify errors, which can be inefficient.

Innovation Solution

A debugger capability for tentatively executing code, allowing users to modify runtime data elements and conduct hypothetical executions based on changed values, isolated from the original execution state, enabling 'what if' scenarios without affecting the original execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If developers manually observe and alter program execution to identify errors, then debugging capability is achieved, but significant time and effort are consumed

Engineering Contradiction:
Improvebug localization accuracyVSAvoiddebugging time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-recording program execution traces during normal program runs. These traces capture runtime data element values, execution paths, and program state information in advance. When debugging is needed, developers can directly query these pre-recorded traces without manually stepping through execution or inserting debug code, significantly reducing debugging time while maintaining accurate bug localization.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If debugging code is inserted to track execution and variables, then code bugs can be identified, but program complexity increases

Engineering Contradiction:
Improveexecution tracking accuracyVSAvoidprogram complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent extracts the debugging functionality from the program code itself by using an external tracing mechanism. Instead of inserting debugging code within the program, the system records execution traces externally during normal runs. Developers can then query these external traces to track execution and variables without modifying the program structure, maintaining code simplicity while achieving accurate execution tracking.

Inventive Principle:
Principle #2Taking out (Extraction)

3Measurement precision

If code portions are temporarily removed to reproduce bugs, then error conditions can be isolated, but development time increases

Engineering Contradiction:
Improveerror isolation accuracyVSAvoiddevelopment speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent creates copies of program execution states through trace recording. Instead of removing code portions to isolate errors, the system captures complete execution traces including all code paths and variable states. Developers can then analyze these trace copies to isolate and understand error conditions without modifying or removing any code, maintaining full program integrity while accelerating the debugging process.

Inventive Principle:
Principle #26Copying

4Measurement precision

If breakpoints and watchpoints are set on code elements, then execution can be suspended for analysis, but debugging setup time increases

Engineering Contradiction:
Improvestate observation accuracyVSAvoiddebugging setup ease
Core Design Contradiction:
Measurement precisionVSEase of operation

Solution Approach 1:

The patent implements a universal trace querying mechanism that replaces the need for setting specific breakpoints and watchpoints. The trace system records all execution states, variable values, and program events universally during normal runs. Developers can then query any point in the execution trace and any variable state without pre-configuring breakpoints or watchpoints, making the debugging setup process simpler and more flexible while maintaining accurate state observation.

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

Data Source

PatentEP3662372B1Tentative execution of code in a debugger
Publication Date: 2022.08.10 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3662372B1 patent drawingFigure 1
  • EP3662372B1 patent drawingFigure 2
  • EP3662372B1 patent drawingFigure 3

AI summary

Tentatively executing an entity includes performing a first, execution of an entity. At a point in the first execution, the first execution is suspended and input specifying an alternate value for a runtime data element is received. Based on the input, a second execution of the entity is performed starting at the point in the first execution, while enabling the first execution to be later resumed unaffected by the second execution. This second execution includes setting the runtime data element to the alternate value, and emulating one or more memory writes performed by the entity during the second execution. The first execution of the entity could comprise a live execution, an execution that is based on trace data, an execution based on a process dump, etc.