Runtime Property Insertion for Dynamic Language Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Dynamic languages lack the capability to distinguish and manage code debugging effectively, particularly when exceptions occur in library code, as they do not have compile-time attributes available at runtime.

Innovation Solution

Inserting statements into code that set properties to indicate whether a debugger should be notified for exceptions within specific scopes, allowing the runtime environment to determine whether to notify development tools based on these properties when exceptions occur.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If compile-time attributes are used to distinguish code for debugging, then debugging control is improved, but dynamic languages cannot utilize this capability since they lack compile-time attributes

Engineering Contradiction:
Improvedebugging controlVSAvoidlanguage compatibility
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent changes the parameter of code attribute availability from compile-time (static) to runtime (dynamic). By inserting statements that set properties on runtime objects, the system enables debugging control in dynamic languages without requiring compile-time processing, thus resolving the contradiction between debugging control and language compatibility

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces an intermediary mechanism (inserted statements that set runtime properties) between the code and the debugger. This intermediary allows the debugger to receive notifications about exceptions in library code versus user code by evaluating property values at runtime, bridging the gap between dynamic language execution and structured debugging control

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of information

If the debugger is notified of all exceptions, then complete exception tracking is achieved, but unnecessary notifications for library code exceptions increase debugging noise

Engineering Contradiction:
Improveexception information completenessVSAvoiddebugging noise
Core Design Contradiction:
Loss of informationVSObject-generated harmful factors

Solution Approach 1:

The patent applies local quality by setting different property values for different code regions. Library code is marked with properties indicating it should not trigger debugger notifications, while user code maintains default behavior. This allows the debugger to selectively notify based on the local context of where an exception occurs, filtering out noise from library code while preserving important user code exceptions

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent performs preliminary action by inserting statements that set properties on runtime objects before exceptions can occur. These pre-set properties enable the debugger to immediately determine whether to notify about an exception when it occurs, without requiring complex analysis at exception time, thus efficiently separating library code exceptions from user code exceptions

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP2850525B1Assisting development tools through inserted code statements
Publication Date: 2019.06.26 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2850525B1 patent drawingFigure 1
  • EP2850525B1 patent drawingFigure 2
  • EP2850525B1 patent drawingFigure 3

AI summary

Aspects of the subject matter described herein relate to assisting development tools. In aspects, statements that influence runtime behavior may be inserted into code of a program. For example, a statement inserted into a function may set a property of a runtime object to indicate that a debugger is to be notified for exceptions that are encountered within the scope of the function. When a runtime environment encounters an exception, the runtime environment may determine whether the property applies to the currently-executing scope. If so, the runtime environment may notify or not notify a development tool of the exception based on the value of the property.