# US 2018/0322031 A1 · Methods and systems for internally debugging code in an on-demand service environment

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

- Number: US 2018/0322031 A1
- Document ID: US20180322031A1
- Status: Published application
- Kind: A1
- Application number: 15/985,548
- Filed: 2018-05-21
- Published: 2018-11-08
- Earliest claimed: 2010-04-16
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Steven Tamm
- Web page: https://patentgrep.com/patent/US20180322031A1

## CPC

- G06F 11/3644: {by instrumenting at runtime}
- G06F 8/70: Software maintenance or management
- G06F 11/3656: {using a specific debug interface}
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A remote debug session for a server group is provided. A server group including multiple servers that perform workload sharing receives a request to debug code executed at the server group. The code is executed on behalf of a client of a database associated with the server group. At least one of the servers of the group initiates a debugging session and establishes a communication connection with the client. The server group maintains the connection open with the client for the duration of the debugging session. Subsequent requests related to the debug session can be handled in a number of ways by the server group, and all communication to the client about processing the requests is through the connection.

## Claims

### Claim at position 1

1-19. (canceled)

### Claim 20

A system comprising at least one memory device coupled with one or hardware processors, the system configurable to:
receive a debugging session request utilizing an application program interface (API) from a client device over a network connection, the debugging session request to debug code executed by the server group;
establish a connection between the server group and the client device to initiate a debugging session between the server group and the client device utilizing the API in response to the debugging session request, the server group to maintain open the connection with the client device for a duration of the debugging session;
enable use of breakpoints via remote debugging utilizing the client device;
maintain state for the debugging session with a resource shared among the server group;
receive service requests via the API; and
distribute the service requests among the server group for processing, wherein each server that processes a request is to communicate via the API to the client device and wherein breakpoint operations are modified to be registered in a same state as the connection, and be connected back to the API.

### Claim 21 (depends on 20)

The system of claim 20, wherein the server group is to maintain state for the debugging session by storing state for the debugging session in a shared memory cache shared among the servers of the server group.

### Claim 22 (depends on 20)

The system of claim 20, wherein the server group is to further
set a breakpoint that interrupts only execution of a thread of a server handling execution of the debugging session, and does not interrupt other execution threads in the server group;
wherein the breakpoint is set with an associated timeout, and execution of the thread is resumed and ended if activity on the thread ceases for the length of the timeout.

### Claim 23 (depends on 20)

The system of claim 20, wherein the server group is to maintain state for the debugging session by creating a thread associated with the debugging session and a stack associated with the thread, wherein the servers of the server group have access to the thread and the stack.

### Claim 24 (depends on 20)

The system of claim 20, wherein a separate debugging stack is created with an associated debugging thread started when the debugging session is initiated.

### Claim 25

The system of thread 24, wherein the debugging thread and associated stack are associated with a debugging session identifier (ID) and state information is to be persisted on the stack.

### Claim 26 (depends on 20)

The system of claim 20, wherein the client device further comprises an integrated development environment (IDE) to communicate with the server group through the API.

### Claim 27 (depends on 26)

The system of claim 26, wherein the IDE enables use of the breakpoints on the client device.

### Claim 28 (depends on 20)

The system of claim 20, wherein the server group further provides a multitenant database environment.

### Claim 29 (depends on 20)

The system of claim 20, wherein each server in the server group that processes a request is to communicate via a connection from a first server to the client device.

### Claim 30

A non-transitory computer-readable medium having stored thereon instructions that, when executed by one or more processors within a server group, are configurable to cause the one or more processors to:
receive a debugging session request utilizing an application program interface (API) from a client device over a network connection, the debugging session request to debug code executed by the server group;
establish a connection between the server group and the client device to initiate a debugging session between the server group and the client device utilizing the API in response to the debugging session request, the server group to maintain open the connection with the client device for a duration of the debugging session;
enable use of breakpoints via remote debugging utilizing the client device;
maintain state for the debugging session with a resource shared among the server group;
receive service requests via the API; and
distribute the service requests among the server group for processing, wherein each server that processes a request is to communicate via the API to the client device and wherein breakpoint operations are modified to be registered in a same state as the connection, and be connected back to the API.

### Claim 31 (depends on 30)

The system of claim 30, wherein the server group is to maintain state for the debugging session by storing state for the debugging session in a shared memory cache shared among the servers of the server group.

### Claim 32 (depends on 30)

The system of claim 30, wherein the server group is to further
set a breakpoint that interrupts only execution of a thread of a server handling execution of the debugging session, and does not interrupt other execution threads in the server group;
wherein the breakpoint is set with an associated timeout, and execution of the thread is resumed and ended if activity on the thread ceases for the length of the timeout.

### Claim 33 (depends on 30)

The system of claim 30, wherein the server group is to maintain state for the debugging session by creating a thread associated with the debugging session and a stack associated with the thread, wherein the servers of the server group have access to the thread and the stack.

### Claim 34 (depends on 30)

The system of claim 30, wherein a separate debugging stack is created with an associated debugging thread started when the debugging session is initiated.

### Claim 35

The system of thread 34, wherein the debugging thread and associated stack are associated with a debugging session identifier (ID) and state information is to be persisted on the stack.

### Claim 36 (depends on 30)

The system of claim 30, wherein the client device further comprises an integrated development environment (IDE) to communicate with the server group through the API.

### Claim 37 (depends on 36)

The system of claim 36, wherein the IDE enables use of the breakpoints on the client device.

### Claim 38 (depends on 30)

The system of claim 30, wherein the server group further provides a multitenant database environment.

### Claim 39 (depends on 30)

The system of claim 30, wherein each server in the server group that processes a request is to communicate via a connection from a first server to the client device.

### Claim 40

A method comprising:
receiving a debugging session request utilizing an application program interface (API) from a client device over a network connection, the debugging session request to debug code executed by the server group;
establishing a connection between the server group and the client device to initiate a debugging session between the server group and the client device utilizing the API in response to the debugging session request, the server group to maintain open the connection with the client device for a duration of the debugging session;
enabling use of breakpoints via remote debugging utilizing the client device;
maintaining state for the debugging session with a resource shared among the server group;
receiving service requests via the API; and
distributing the service requests among the server group for processing, wherein each server that processes a request is to communicate via the API to the client device and wherein breakpoint operations are modified to be registered in a same state as the connection, and be connected back to the API.

### Claim 41 (depends on 40)

The method of claim 40, wherein the server group is to maintain state for the debugging session by storing state for the debugging session in a shared memory cache shared among the servers of the server group.

### Claim 42 (depends on 40)

The method of claim 40, further comprising:
setting a breakpoint that interrupts only execution of a thread of a server handling execution of the debugging session, and does not interrupt other execution threads in the server group;
wherein the breakpoint is set with an associated timeout, and execution of the thread is resumed and ended if activity on the thread ceases for the length of the timeout.

### Claim 43 (depends on 40)

The method of claim 40, wherein the server group is to maintain state for the debugging session by creating a thread associated with the debugging session and a stack associated with the thread, wherein the servers of the server group have access to the thread and the stack.

### Claim 44 (depends on 40)

The method of claim 40, wherein a separate debugging stack is created with an associated debugging thread started when the debugging session is initiated.

### Claim 45

The method of thread 44, wherein the debugging thread and associated stack are associated with a debugging session identifier (ID) and state information is to be persisted on the stack.

### Claim 46 (depends on 40)

The method of claim 40, wherein the client device further comprises an integrated development environment (IDE) to communicate with the server group through the API.

### Claim 47 (depends on 46)

The method of claim 46, wherein the IDE enables use of the breakpoints on the client device.

### Claim 48 (depends on 40)

The method of claim 40, wherein the server group further provides a multitenant database environment.

### Claim 49 (depends on 40)

The method of claim 40, wherein each server in the server group that processes a request is to communicate via a connection from a first server to the client device.
