Non-blocking Server Debugging via Segmented Client-Server Pipeline

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional debugging methods for server-side code are invasive and blocking, requiring high-level privileges, which limits low-privileged users' ability to debug without disrupting other users or processes, and often compromise security.

Innovation Solution

A cooperative, non-invasive, non-blocking debugger that executes on a server, using a two-way communication pipeline with clients, allowing multiple users to debug simultaneously without freezing other threads or processes, utilizing standard protocols like HTTP, TCP, and encoding methods such as XML, SOAP, or JSON, and employing techniques like long-polling for communication.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a traditional debugger is used to debug server-side code, then debugging functionality is achieved, but other threads and processes are blocked and high-level privileges are required

Engineering Contradiction:
Improvedebugging functionalityVSAvoidserver response time
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The debugger is segmented into two separate components: a debugger client running on the user's machine and a debugger server running on the target machine. This segmentation allows the debugging functionality to be distributed, with the client initiating debug operations and the server executing them in a controlled manner, preventing blocking of other server threads while maintaining full debugging capabilities

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A debugger server acts as an intermediary between the debugger client and the target process. The server receives debug commands from the client, processes them safely, and returns results. This intermediary layer enables debugging without requiring high-level privileges on the client machine and prevents blocking of other server operations by isolating debug operations within the server's controlled environment

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If high-level privileges are granted to run a debugger, then debugging capabilities are enabled, but security is compromised

Engineering Contradiction:
Improvedebugger executionVSAvoidsecurity risk
Core Design Contradiction:
Ease of operationVSObject-affected harmful factors

Solution Approach 1:

The debugger server serves as a privileged intermediary that mediates between the unprivileged debugger client and the target process. The client communicates debug requests to the server over the network, and the server executes these requests with appropriate privileges. This architecture enables debugging functionality while maintaining security by restricting privilege escalation to the server, which is already trusted to run the target process

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

Instead of requiring the client to directly access and control the target process (which would require high-level privileges), the system creates a copy of the debugging functionality on the server side. The debugger server replicates the essential debugging operations locally, allowing the client to control debugging remotely without needing direct privileged access to the target machine

Inventive Principle:
Principle #26Copying

3Measurement precision

If a debugger is attached to a server process, then code inspection is enabled, but other users accessing the server experience slowdowns or freezes

Engineering Contradiction:
Improvecode inspection capabilityVSAvoidserver response speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The debugger implements dynamic control over the debugging process, allowing the debugger client to selectively enable or disable breakpoints, step-through modes, and other debugging operations. This dynamic control enables the system to adjust debugging intensity based on current needs, minimizing impact on server performance while maintaining code inspection capabilities when required

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The debugger uses event-driven periodic action where the server process continues normal execution and only pauses at specific events such as breakpoints, exceptions, or when explicitly requested by the debugger client. This periodic interruption approach allows the server to maintain high performance during normal operation while enabling detailed code inspection only when debugging events occur

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS9064049B2Remote debugging of server side code without blocking or high-level privileges
Publication Date: 2015.06.23 MICROSOFT TECHNOLOGY LICENSING LLC
  • US9064049B2 patent drawing
  • US9064049B2 patent drawing
  • US9064049B2 patent drawing

AI summary

A server exposes debugger services to a plurality of debugger clients. One or more debugger clients can select a debug operation and establish a debug session in a thread of a server process for debugging user code. A two-way debug communication pipeline can be established between a debugger client and the server using standard encoding protocols and standard network transport protocols. A two-way debug communication pipeline can be established using HTTP where the server can initiate a communication with the debugger client using a long polling technique. When one of the threads of the server process is suspended, the other threads in the server process continue to execute.