# US 2015/0178181 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 2015/0178181 A1
- Document ID: US20150178181A1
- Status: Published application
- Kind: A1
- Application number: 14/636,997
- Filed: 2015-03-03
- Published: 2015-06-25
- Earliest claimed: 2010-04-16
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Steven Tamm
- Web page: https://patentgrep.com/patent/US20150178181A1

## 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. One of the servers of the group initiates a debugging session and establishes a communication connection with the client. The one server 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 by the one server.

## Claims

### Claim 1

A system comprising:
a server group appearing to a client device as a single server entity associated with a database, the server group including multiple servers that share tasks among the multiple servers, the server group to
receive a debugging session request from a client device over a network connection, the debugging session request to debug code executed by the server group and not locally at the client device;
establish a connection to the client device via a first server of the server group to initiate a debugging session between the server group and an integrated development environment (IDE) of the client device in response to the debugging session request, the first server to maintain open the connection with the client device for a duration of the debugging session;
for subsequent service requests of the debugging session at the server group, maintain state for the debugging session with a resource shared among the server group, receive the service requests with the first server and distribute the service requests among the server group for processing, wherein each server that processes a request is to communicate via the connection from the first server to the client device about processing on the service requests and wherein breakpoint operations are modified to be registered in a same state as the connection, and be connected back to the first server.

### Claim 2 (depends on 1)

The system of claim 1, wherein the database comprises a multitenant database shared by a plurality of separate and distinct customer organizations,
wherein the multitenant database stores data for multiple client organizations each identified by a tenant identifier (ID) and one or more users are associated with the tenant ID,
wherein the one or more users of each client organization accesses data identified by the tenant ID associated with the respective client organization, and
wherein the multitenant database is hosted by an entity separate from the client organization.

### Claim 3 (depends on 1)

The system of claim 1, wherein the first server of the server group is to establish the connection by initiating a communication thread for communication from the first server to the client device, the communication thread to be maintained for the duration of the debugging session.

### Claim 4 (depends on 1)

The system of claim 1, 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 5 (depends on 1)

The system of claim 1, 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 6 (depends on 1)

The system of claim 1, 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 7

A method comprising:
receiving a debugging session request at a server group from a client device over a network connection, the server group appearing to the client device as a single server entity associated with a database, the server group including multiple servers that share tasks among the multiple servers based on workload sharing, the debugging session request to debug code executed by the server group and not locally at the client device;
establishing a connection to the client device via a first server of the server group to initiate a debugging session between the server group and an integrated development environment (IDE) of the client device in response to the debugging session request, the first server to maintain open the connection with the client device for a duration of the debugging session;
maintaining state for the debugging session for subsequent service requests of the debugging session at the server group with a resource shared among the server group;
receiving the service requests with the first server; and
distributing the service requests among the server group for processing, wherein each server that processes a request is to communicate via the connection from the first server to the client device about processing on the service requests and wherein breakpoint operations are modified to be registered in a same state as the connection, and be connected back to the first server.

### Claim 8 (depends on 7)

The method of claim 7, wherein the code executed by the server group comprises an application on data stored at the server group for the client device.

### Claim 9 (depends on 7)

The method of claim 7, wherein the database comprises a multitenant database and the server group provides processing services for access to the multitenant database,
wherein the multitenant database stores data for multiple client organizations each identified by a tenant identifier (ID) and one or more users are associated with the tenant ID, the client device being one of the users associated with the tenant ID,
wherein the one or more users of each client organization accesses data identified by the tenant ID associated with the respective client organization, and
wherein the multitenant database is hosted by an entity separate from the client organization.

### Claim 10 (depends on 7)

The method of claim 7, wherein establishing the connection further comprises:
initiating a communication thread for communication from the first server to the client device, the communication thread to be maintained for the duration of the debugging session.

### Claim 11 (depends on 7)

The method of claim 7, wherein registering the debugging session for the client device further comprises:
generating an identifier (ID) for the debugging session; and
associating the ID with the first server, wherein a second server of the server group directs communication related to the debugging session to the first server based on the associated ID.

### Claim 12 (depends on 7)

The method of claim 7, wherein maintaining state for the debugging session further comprises:
storing state for the debugging session in a shared memory cache shared among the servers of the server group.

### Claim 13 (depends on 7)

The method of claim 7, wherein maintaining state for the debugging session further comprises:
initiating a debugging thread with an associated stack for the debugging session, the debugging thread to be maintained for the duration of the debugging session.

### Claim 14 (depends on 7)

The method of claim 7, further comprising:
starting a new processing thread for each subsequent service request, and closing each processing thread upon servicing its corresponding request.

### Claim 15 (depends on 7)

The method of claim 7, 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 setting the breakpoint includes setting 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 16 (depends on 7)

The method of claim 7, wherein maintaining state comprises storing state information in the associated stack.

### Claim 17

An article of manufacture comprising a non-transitory computer readable storage medium having content stored thereon, which when executed, cause a machine to perform operations including:
receiving a debugging session request at a server group from a client device over a network connection, the server group appearing to the client device as a single server entity associated with a database, the server group including multiple servers that share tasks among the multiple servers based on workload sharing, the debugging session request to debug code executed by the server group and not locally at the client device;
establishing a connection to the client device via a first server of the server group to initiate a debugging session between the server group and an integrated development environment (IDE) of the client device in response to the debugging session request, the first server to maintain open the connection with the client device for a duration of the debugging session;
maintaining state for the debugging session for subsequent service requests of the debugging session at the server group with a resource shared among the server group;
receiving the service requests with the first server; and
distributing the service requests among the server group for processing, wherein each server that processes a request is to communicate via the connection from the first server to the client device about processing on the service requests and wherein breakpoint operations are modified to be registered in a same state as the connection, and be connected back to the first server.

### Claim 18 (depends on 17)

The article of manufacture of claim 17, wherein maintaining state for the debugging session further comprises:
storing state for the debugging session in a shared memory cache shared among the servers of the server group.

### Claim 19 (depends on 17)

The article of manufacture of claim 17, wherein maintaining state for the debugging session further comprises:
initiating a debugging thread with an associated stack for the debugging session, the debugging thread to be maintained for the duration of the debugging session; and
storing the state information in the associated stack.
