# US 2011/0258614 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 2011/0258614 A1
- Document ID: US20110258614A1
- Status: Published application
- Kind: A1
- Application number: 13/085,316
- Filed: 2011-04-12
- Published: 2011-10-20
- Earliest claimed: 2010-04-16
- Assignees: salesforce.com, inc.
- Inventors: Steven Tamm
- Web page: https://patentgrep.com/patent/US20110258614A1

## 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 database including hardware and software components to implement the database;
a server group coupled to the database, the server group appearing to the client device as a single server entity, the server group including multiple servers that share tasks among the multiple servers based on workload sharing to implement operations for multiple clients, the server group to
receive a debugging session request from a client device over a network connection, the 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 in response to the request, the first server to maintain open the connection with the client device for a duration of the debugging session;
register the debugging session for the client device via the first server; and
for subsequent service requests related to the debugging session at the server group, maintain state for the debugging session, and communicate via the connection from the first server to the client device about processing on the service requests.

### 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; and

### 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 maintain state for the debugging session by
designating a server of the server group that received the request for the debugging session to service the debugging session; and
allocating subsequent service requests related to the debugging session at the server group to the first server based on the registering, rather than allocating the subsequent service requests within the server group based on workload sharing.

### Claim 6 (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 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 to implement operations for multiple clients, the 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 in response to the request, the first server to maintain open the connection with the client device for a duration of the debugging session;
registering the debugging session for the client device via the first server; and
for subsequent service requests related to the debugging session at the server group, maintaining state for the debugging session, and communicating via the connection from the first server to the client device about processing on the service requests.

### 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, wherein maintaining state for the debugging session further comprises:
designating a single server of the server group to service the debugging session; and
allocating subsequent service requests related to the debugging session at the server group to the first server based on the registering, rather than allocating the subsequent service requests within the server group based on workload sharing.

### Claim 15 (depends on 14)

The method of claim 14, wherein designating the single server of the server group comprises:
designating a server of the server group that received the request for the debugging session to service the debugging session.

### Claim 16 (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 17 (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 18

An article of manufacture comprising a 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 to implement operations for multiple clients, the 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 in response to the request, the first server to maintain open the connection with the client device for a duration of the debugging session;
registering the debugging session for the client device via, the first server; and
for subsequent service requests related to the debugging session at the server group, maintaining state for the debugging session, and communicating via, the connection from the first server to the client device about processing on the service requests.

### Claim 19 (depends on 18)

The article of manufacture of claim 18, 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 20 (depends on 18)

The article of manufacture of claim 18, wherein maintaining state for the debugging session further comprises:
designating a server of the server group that received the request for the debugging session to service the debugging session; and
allocating subsequent service requests related to the debugging session at the server group to the first server based on the registering, rather than allocating the subsequent service requests within the server group based on workload sharing.
