# US 2018/0121324 A1 · Debug Event Handling

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0121324 A1
- Document ID: US20180121324A1
- Status: Published application
- Kind: A1
- Application number: 15/341,485
- Filed: 2016-11-02
- Published: 2018-05-03
- Earliest claimed: 2016-11-02
- Assignees: ServiceNow, Inc.
- Applicants: ServiceNow, Inc.
- Inventors: Christopher Tucker; Qian Zhang; Carl David Solis, JR.
- Web page: https://patentgrep.com/patent/US20180121324A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods are disclosed for debug event handling. For example, methods may include receiving a request from a client device. Methods may include, responsive to receiving the request, identifying a set of instructions to be executed, wherein the set of instructions is associated with at least one breakpoint. Methods may include initiating execution of the set of instructions. Methods may include pausing execution of the set of instructions when an instruction of the set of instructions associated with a breakpoint is reached. Methods may include, after the breakpoint is reached and before a new request is received from the client device, transmitting, to the client device, a message that indicates that a breakpoint has been reached. Methods may include terminating execution of the set of instructions responsive to determining that a debugger interface on the client device is no longer available to control execution of the set of instructions.

## Claims

### Claim 1

A system for providing a client-side debugger interface for a server-executed set of instructions, the system comprising:
a memory;
a processor; and
a network interface,
wherein the memory includes machine-readable code executable by the processor to:
receive a first request from a client device;
responsive to receiving the first request, identify a first set of instructions to be executed, wherein the first set of instructions is associated with at least one breakpoint;
initiate execution of the first set of instructions;
pause execution of the first set of instructions when an instruction of the first set of instructions associated with a first breakpoint is reached;
after the first breakpoint is reached and before a new request is received from the client device, transmit, to the client device, a message that indicates that a breakpoint has been reached; and
terminate execution of the first set of instructions responsive to determining that a debugger interface on the client device is no longer available to control execution of the first set of instructions.

### Claim 2 (depends on 1)

The system of claim 1, wherein the machine-readable code to terminate execution of the first set of instructions comprises machine-readable code to:
terminate debugging of the first set of instructions by a script interpreter by sending a command to a debug interface of a script interpreter to stop interpreting or debugging the first set of instructions.

### Claim 3 (depends on 1)

The system of claim 1, wherein the message that indicates that a breakpoint has been reached is transmitted via a WebSocket.

### Claim 4 (depends on 1)

The system of claim 1, wherein the message that indicates that a breakpoint has been reached is transmitted via a channel established by long polling from the client device.

### Claim 5 (depends on 1)

The system of claim 1, wherein the memory includes machine-readable code executable by the processor to:
determine that a session associated with the first request has terminated; and
responsive to the determination that the session associated with the first request has terminated, skip one or more remaining breakpoints associated with the first set of instructions.

### Claim 6 (depends on 1)

The system of claim 1, wherein the memory includes machine-readable code executable by the processor to:
determine that a user is not permitted to access an instruction of the first set of instructions that is associated with a second breakpoint; and
responsive to the determination that the user is not permitted to access the instruction from the first set of instructions that is associated with the second breakpoint, skip the second breakpoint by executing the instruction of the first set of instructions associated with the second breakpoint without pausing execution of the first set of instructions.

### Claim 7 (depends on 1)

The system of claim 1, wherein the memory includes machine-readable code executable by the processor to:
receive a second request from the client device to step into a second set of instructions from the first set of instructions;
determine that a user is not permitted to access the second set of instructions; and
responsive to the determination that the user is not permitted to access the second set of instructions, step over the second set of instructions by executing the second set of instructions without pausing execution of the first set of instructions.

### Claim 8 (depends on 1)

The system of claim 1, wherein the memory includes machine-readable code executable by the processor to:
as a precondition for pausing at the first breakpoint, determine, based on a marker, that pausing execution using a session data structure is permitted.

### Claim 9 (depends on 1)

The system of claim 1, wherein the memory includes machine-readable code executable by the processor to:
as a precondition for pausing at the first breakpoint, determine, based on a marker, that a number of concurrently paused transactions using a session data structure has not exceeded a limit.

### Claim 10 (depends on 1)

The system of claim 1, wherein the memory includes machine-readable code executable by the processor to:
determine that execution of the first set of instructions will be continued from a paused state; and
responsive to the determination that execution of the first set of instructions will be continued from a paused state, update a marker to indicate that execution of the first set of instructions is no longer paused using a session data structure.

### Claim 11 (depends on 1)

The system of claim 1, wherein the first set of instructions is a script and execution of the first set of instructions includes interpreting instructions of the first set of instructions using a script interpreter executed by the processor.

### Claim 12 (depends on 11)

The system of claim 11, wherein the script interpreter includes a debug interface that permits an application executed by the processor to pause and continue execution of the first set of instructions by interfacing with the debug interface.

### Claim 13

A method for providing a client-side debugger interface for a server-executed set of instructions, the method comprising:
identifying a first set of instructions to be executed, wherein the first set of instructions is associated with at least one breakpoint;
initiating execution of the first set of instructions;
pausing execution of the first set of instructions when an instruction of the first set of instructions associated with a first breakpoint is reached;
after the first breakpoint is reached and before a new request is received from a client device, transmitting, to the client device, a message that indicates that a breakpoint has been reached; and
terminating execution of the first set of instructions responsive to determining that a debugger interface on the client device is no longer available to control execution of the first set of instructions.

### Claim 14 (depends on 13)

The method of claim 13, wherein terminating execution of the first set of instructions comprises:
terminating debugging of the first set of instructions by a script interpreter by sending a command to a debug interface of a script interpreter to stop interpreting or debugging the first set of instructions.

### Claim 15 (depends on 13)

The method of claim 13, wherein the message that indicates that a breakpoint has been reached is transmitted via a WebSocket.

### Claim 16 (depends on 13)

The method of claim 13, wherein the message that indicates that a breakpoint has been reached is transmitted via a channel established by long polling from the client device.

### Claim 17 (depends on 13)

The method of claim 13, comprising:
determining that a session has terminated; and
skipping a second breakpoint by executing an instruction of the first set of instructions associated with the second breakpoint without pausing execution of the first set of instructions.

### Claim 18 (depends on 13)

The method of claim 13, comprising:
determining that a user is not permitted to access an instruction of the first set of instructions that is associated with a second breakpoint; and
responsive to the determination that the user is not permitted to access the instruction from the first set of instructions that is associated with the second breakpoint, skipping the second breakpoint by executing the instruction of the first set of instructions associated with the second breakpoint without pausing execution of the first set of instructions.

### Claim 19 (depends on 13)

The method of claim 13, comprising:
receiving a request from the client device to step into a second set of instructions from the first set of instructions;
determining that a user is not permitted to access the second set of instructions; and
responsive to the determination that the user is not permitted to access the second set of instructions, stepping over the second set of instructions by executing the second set of instructions without pausing execution of the first set of instructions.

### Claim 20

A non-transitory computer-readable storage medium, comprising executable instructions that, when executed by a processor, facilitate performance of operations, comprising:
receiving a first request from a client device;
responsive to receiving the first request, identifying a first set of instructions to be executed, wherein the first set of instructions is associated with at least one breakpoint;
initiating execution of the first set of instructions;
pausing execution of the first set of instructions when an instruction of the first set of instructions associated with a first breakpoint is reached;
after the first breakpoint is reached and before a new request is received from the client device, transmitting, to the client device, a message that indicates that a breakpoint has been reached; and
terminating execution of the first set of instructions responsive to determining that a debugger interface on the client device is no longer available to control execution of the first set of instructions.
