Program debugging method and device, computer system and storage medium

By managing and switching between multiple servers for debugging within a unified user interface on the client side, the complexity and resource consumption issues of multi-server debugging in existing remote debugging tools are resolved, achieving efficient multi-task debugging and a user-friendly debugging experience.

CN122019341APending Publication Date: 2026-05-12BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING YOUZHUJU NETWORK TECH CO LTD
Filing Date
2024-11-11
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing remote debugging tools, such as gdb client and gdb server, have a one-to-one relationship. This means that when debugging multiple servers simultaneously, multiple clients need to be started, which consumes computing resources, increases debugging complexity, and switching between different clients to debug information may reduce efficiency.

Method used

A program debugging method and apparatus are provided, which allows a client to connect to and manage multiple servers through a unified user interface, switch between different servers for debugging within the same client by selecting operations, and establish multiple communication sessions to achieve debugging across multiple servers.

Benefits of technology

It improves the efficiency of debugging, enhances multitasking capabilities, improves user experience, simplifies the debugging process, and is suitable for parallel computing and multi-server debugging scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019341A_ABST
    Figure CN122019341A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a program debugging method and device, a computer system and a storage medium. The program debugging method is used for a client side and comprises the steps that in response to a first selection operation on a first debugging interface, the client side is connected to a first server, and program debugging is conducted on the first server; and in response to a second selection operation on the first debugging interface, connecting the client to a second server so as to perform program debugging on the second server. According to the method, one client is allowed to be connected with a plurality of servers at the same time, and the plurality of servers are managed and switched in a unified user interface, so that the debugging efficiency is improved, the multi-task capability is enhanced, the user experience is improved, and meanwhile, convenient conditions are created for parallel operation and debugging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to a program debugging method and apparatus, a computer system, and a storage medium. Background Technology

[0002] Remote debugging tools are a class of software tools that allow an application to run on one machine (usually a server) while the developer debugs the application on another machine (usually a client). These tools are particularly important when developing and maintaining network services, distributed systems, and large-scale computing applications. Summary of the Invention

[0003] At least one embodiment of this disclosure provides a program debugging method for a client, the program debugging method comprising: connecting the client to a first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and connecting the client to a second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0004] At least one embodiment of this disclosure also provides a computer system including a plurality of servers and a client, the plurality of servers including a first server and a second server, the client being configured to: connect to the first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and connect to the second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0005] At least one embodiment of this disclosure also provides a program debugging apparatus for a client, the program debugging apparatus including a first connection module and a second connection module, the first connection module being configured to connect the client to a first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and the second connection module being configured to connect the client to a second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0006] At least one embodiment of this disclosure also provides a program debugging apparatus for a client, the program debugging apparatus including at least one memory and at least one processor, the at least one memory being configured to store computer-executable instructions, and the at least one processor being configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, implement the program debugging method as described in any of the above embodiments.

[0007] At least one embodiment of this disclosure also provides an electronic device, which includes the program debugging apparatus described in any of the foregoing embodiments.

[0008] At least one embodiment of this disclosure also provides a non-transitory storage medium for non-transitory storage of computer-executable instructions, wherein when the computer-executable instructions are executed by at least one processor, the program debugging method as described in any of the above embodiments is implemented. Attached Figure Description

[0009] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments will be briefly described below. Obviously, the drawings described below only relate to some embodiments of this disclosure and are not intended to limit this disclosure.

[0010] Figure 1 This diagram illustrates how a gdb client debugs an application running on a server.

[0011] Figure 2 A schematic diagram of a system for debugging a server using a gdb client, provided in at least one embodiment of this disclosure, is shown.

[0012] Figure 3 A schematic diagram of a debugging interface provided in at least one embodiment of the present disclosure is shown.

[0013] Figure 4 A flowchart of a program debugging method provided in at least one embodiment of the present disclosure is shown.

[0014] Figure 5 A schematic diagram of a program debugging apparatus provided in at least one embodiment of the present disclosure is shown.

[0015] Figure 6 A schematic diagram of another program debugging apparatus provided in at least one embodiment of the present disclosure is shown.

[0016] Figure 7 A schematic diagram of an electronic device provided in at least one embodiment of the present disclosure is shown.

[0017] Figure 8 A schematic diagram of a non-transitory storage medium provided in at least one embodiment of the present disclosure is shown. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0019] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as “comprising” or “including” mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as “connected” or “linked” are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as “upper,” “lower,” “left,” and “right” are used only to indicate relative positional relationships, and these relative positional relationships may change accordingly when the absolute position of the described objects changes.

[0020] To keep the following description of embodiments of the present disclosure clear and concise, detailed descriptions of certain known functions and components are omitted.

[0021] A debugging tool is a software tool used to help developers find, diagnose, and fix errors or abnormal behavior in a program.

[0022] Program debugging tools offer a variety of functions to help developers better understand the program's execution flow and locate and resolve problems. Key features of these tools include: allowing developers to set breakpoints at specific locations in the code, pausing program execution at these breakpoints for inspection; allowing developers to execute the program line by line or instruction by instruction to observe the execution flow and variable changes; displaying the values ​​of all variables within the current scope to help understand the program's state; displaying the call stack at the current execution point to understand the function call history; allowing developers to view and modify the program's memory contents; breakpoints can be triggered based on specific conditions for more precise debugging; triggering breakpoints when specific data is accessed or modified; providing information on program execution time and resource usage to help optimize performance; automatically pausing the program when exceptions or errors occur to help locate problems; allowing developers to debug programs running on one machine while running on another; and supporting debugging in multi-threaded environments to help understand thread interactions and synchronization issues. Program debugging tools are typically integrated with an Integrated Development Environment (IDE), but some standalone debugging tools also exist, such as GDB (GNU Debugger). Program debugging tools are an important part of the software development process, helping developers to locate and solve problems more efficiently, and improve the quality and stability of software.

[0023] Remote debugging is a crucial function used in program debugging. The inventors of this disclosure noted that the ability to run the application being debugged on one server while the developer debugs it on another client is particularly important in applications using accelerator cards, as these scenarios often require debugging multiple servers and multiple accelerator cards within those servers. The use of remote debugging tools can significantly improve development efficiency, shorten development cycles, and help developers quickly identify and fix bugs. Therefore, the inventors recognized that improving the debugging capabilities and ease of use of remote debugging tools is a critical issue.

[0024] For current remote debugging tools (such as the GNU Debugger (gdb)), the relationship between the gdb client and the gdb server (gdb-server) is one-to-one. This means that if you need to debug a program on multiple servers, you must start multiple clients to connect to the gdb server on each of those servers. This approach introduces many inconveniences when debugging multiple servers simultaneously, including: each client requires additional computing resources, such as memory and processor (e.g., CPU); developers need to monitor and manage multiple clients simultaneously, increasing the complexity of debugging; switching between different clients to view debugging information on different servers may reduce debugging efficiency; and maintaining consistency in debugging status across multiple clients can become difficult.

[0025] Figure 1 This diagram illustrates how a gdb client debugs an application running on a server. Figure 1 As shown, when a user needs to debug both gdb server 0 and gdb server 1 simultaneously, they need to open a client for gdb server 0 and gdb server 1 respectively, that is, operate two clients separately.

[0026] For example, gdb client 0 is opened for gdb server 0, and gdb client 0 communicates with gdb server 0 to run the program through one or more accelerator cards (e.g., accelerator card 0 and accelerator card 1) included in gdb server 0, and the user debugs the program in the operation interface of gdb client 0.

[0027] For example, gdb client 1 is opened for gdb server 1, and gdb client 1 communicates with gdb server 1 to run the program through one or more accelerator cards (e.g., accelerator card 0 and accelerator card 1) included in gdb server 1, and the user debugs the program in the operation interface of gdb client 1.

[0028] For example, opening multiple clients means opening multiple independent debugging windows or pages in the debugging tool; that is, multiple debugging windows (or multiple debugging pages) are used for program debugging independently. For example, different debugging pages control different server resources for program debugging. For example, such as... Figure 1 As shown, different clients control applications running on different servers to access resources on those servers for program debugging.

[0029] It should be noted that, although Figure 1 The debugging tool shown is GDB, but the embodiments of this disclosure are not limited to it, and the inventive concept of the embodiments of this disclosure is also applicable to any other type of debugging tool.

[0030] At least one embodiment of this disclosure provides a program debugging method for a client, comprising: connecting the client to a first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and connecting the client to a second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0031] The program debugging method provided by the above embodiments of this disclosure allows multiple servers to be connected simultaneously through the same client, and the multiple servers to be managed and switched in a unified user interface. This not only improves the efficiency of debugging work and enhances multitasking capabilities, but also improves the user experience, while creating convenient conditions for parallel computing and debugging.

[0032] At least one embodiment of this disclosure also provides a computer system including a client and a plurality of servers, the plurality of servers including a first server and a second server, the client being configured to: connect to the first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and connect to the second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0033] The technical effects of the computer system in the above embodiments of this disclosure are the same as those of the above program debugging method, and therefore will not be repeated.

[0034] The various embodiments of this disclosure will now be described with reference to specific examples.

[0035] Figure 2 The diagram illustrates a system for debugging a server by a client, according to at least one embodiment of this disclosure. For example, the client here is a gdb client, and the server is a gdb server.

[0036] like Figure 2As shown, the computer system includes one or more gdb clients and multiple service servers, which can be called a program debugging system. In this debugging system, the client has a unified user interface (e.g., a single user interface) and can connect to multiple gdb servers simultaneously. For example, whenever a user connects the gdb client to a new gdb server, the server previously connected to the gdb client will not disconnect from the gdb client (e.g., the user can actively choose to disconnect the previously connected server if needed), and the client will establish a new session in the program debugging system to interface with the server to be connected to. This allows the user to connect to multiple servers simultaneously through multiple established sessions and flexibly switch between these connected servers for debugging.

[0037] For example, such as Figure 2 As shown, the gdb client for program debugging includes a user interface, through which program debugging is performed on multiple gdb servers. For example, Figure 2 The program debugging system includes gdb server 0, gdb server 1, ..., gdb server n, each with one or more heterogeneous device resources. It should be noted that, although... Figure 2 The gdb server 0, gdb server 1, ..., gdb server n shown in the diagram each include n+1 heterogeneous device resources (e.g., n+1 accelerator cards, where n is a positive integer). However, the embodiments of this disclosure do not impose any limitations on the number and type of heterogeneous device resources included in each server. Different servers may include the same or different numbers of heterogeneous device resources and the same or different types of heterogeneous device resources. Furthermore, although... Figure 2 Only gdb client and gdb server are shown in this disclosure, but the embodiments of this disclosure do not limit the types of program debugging systems. The inventive concepts provided by the embodiments of this disclosure can also be applied to any other type of program debugging system, which may include other types of clients and servers.

[0038] For example, heterogeneous device resources can include various types of accelerator cards. For instance, heterogeneous device resources refer to the integration of different types and performance levels of processors or hardware resources within a single computing system to achieve efficient and flexible parallel processing capabilities. For example, accelerator cards in a server can include graphics processors, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), digital signal processors (DSPs), and any other type of dedicated accelerator (e.g., dedicated hardware designed for specific tasks, such as network accelerators, storage accelerators, etc.). The embodiments of this disclosure do not impose any limitations on the type of accelerator cards used in servers.

[0039] For example, communication connections are established through different communication sessions between the client and the first and second servers, respectively. For example, such as... Figure 2 As shown, users can establish corresponding communication sessions with gdb server 0, gdb server 1, ..., gdb server n through the same user interface in the gdb client, thereby realizing the communication connection between the gdb client and gdb server 0, gdb server 1, ..., gdb server n.

[0040] For example, in such Figure 2 In the program debugging system shown, a communication connection is established between the client and the server through a session for transmitting debugging commands, data, and status information. In at least one embodiment, this session is the basis for interaction between the client and the server, enabling the client to control the debugging process on the server and receive debugging information from the server. For example, during the session establishment process, the user can select or configure a known target server through the client's user interface, or manually enter the server's address and port number; the client sends a connection request to the specified server, which may include necessary authentication information to ensure that only authorized clients can establish a session; after receiving the connection request, the server verifies the client's identity and responds to the client's request. If authentication is successful, the server allocates resources for this session and prepares to receive debugging commands.

[0041] For example, once the server is ready, a session is formally established between the client and server. After the session is established, the client can begin sending debugging commands, such as setting breakpoints and single-stepping. For example, during the session, the client can send debugging commands to the server, which executes these commands and returns the results to the client. For example, the client can also request to view debugging information such as variable values ​​and call stacks. For example, to keep the session active, the client and server need to exchange heartbeat messages periodically. For example, heartbeat messages confirm that both the client and server are still connected and can continue debugging interactions. For example, when the debugging task is completed or the user actively ends debugging, the client sends a command to close the session to the server. Upon receiving the command, the server releases relevant resources and disconnects the session.

[0042] For example, such as Figure 2 The program debugging system shown can support multiple servers, requiring the client to establish sessions with multiple servers simultaneously. For example, to manage multiple sessions, the client can maintain a session list displaying all currently established sessions. Users can switch between different sessions via a user interface. The client can display the status of each session, such as connection status and debugging progress. The client can also provide functions (e.g., inputting line commands or menu commands) to add new sessions, disconnect sessions, and reconnect sessions. Through this session management mechanism, users can debug programs on multiple servers simultaneously on the same client, greatly improving debugging efficiency and convenience.

[0043] Figure 3 A schematic diagram of a debugging interface (also known as a program debugging interface) provided in at least one embodiment of the present disclosure is shown.

[0044] For example, such as Figure 3 As shown, the debugging interface may include a section for displaying debugging code (also known as a debugger) for program debugging, a session management section, etc. For example, the debugging interface may also include a drop-down menu; for example, the debugging interface may also include an input box where the user can enter commands. For example, the user can enter any debugging operation they want to perform, such as the server to connect to, the server to disconnect from, or the server to debug, after entering the command in the input box, to realize any operation the user wants to perform during the program debugging process. The embodiments of this disclosure do not limit the specific structure of the debugging interface or the command input method.

[0045] For example, such as Figure 3As shown, the debugging interface (also known as the user interface) displays all current server connections. Users can switch to any connected gdb server by entering simple command lines within the debugging interface. For example, users no longer need to launch a separate client for each server; instead, they can control multiple servers through a single user interface, greatly simplifying the debugging workflow. The debugging interface also provides intuitive visualization tools to help users better manage and monitor debugging tasks on each server. Each gdb server can contain one or more heterogeneous accelerator cards. When the debugging interface switches to a specific server, users can issue gdb commands to perform hardware and software debugging on these heterogeneous devices. By switching between different gdb servers, users can complete the debugging of heterogeneous devices on all gdb servers using the same gdb client (or the same debugging interface), greatly improving debugging efficiency and convenience.

[0046] Figure 4 A flowchart illustrating a program debugging method provided in at least one embodiment of this disclosure is shown. For example... Figure 4 As shown, in some embodiments of this disclosure, the program debugging method includes steps S101-S102.

[0047] Step S101: In response to the first selection operation on the first debugging interface, the client connects to the first server to debug the program on the first server.

[0048] In step S102, in response to the second selection operation on the first debugging interface, the client is connected to the second server to debug the program on the second server.

[0049] For example, for step S101, return to the reference. Figure 2 and Figure 3 When a user enters a command to connect to gdb server 0 in the client's unified debugging interface, a communication session is established between the gdb client and gdb server 0. For example, after establishing the communication session, the user can debug the accelerator card resources in gdb server 0 through this unified debugging interface.

[0050] For example, for step S102, return to the reference. Figure 2 and Figure 3When a user enters a command to connect to gdb server 1 through the unified debugging interface on the client, the gdb client establishes a communication session with gdb server 1. For example, after establishing a communication session, the user can debug the accelerator card resources on gdb server 1 through this unified debugging interface. For example, the gdb client can establish communication sessions with both gdb server 0 and gdb server 1 simultaneously; that is, when adding a new communication session to connect the gdb client to a new server, it is not necessary to disconnect the server already connected to the gdb client.

[0051] For example, program debugging on a first server includes: debugging a first program running on the first server through a client; for example, program debugging on a second server includes: debugging a second program running on the second server through a client, wherein the first program and the second program correspond to different execution processes of the same task.

[0052] For example, return to the reference. Figure 2 Users can connect their client to multiple servers within a single debugging interface, and then utilize the resources of these servers to debug the same program, thereby improving debugging efficiency. For example, a client can debug program A running on gdb server 0, and a client can also debug program B running on gdb server 1. For instance, programs A and B may be different execution processes of the same debugging task, and they may even communicate over a network.

[0053] For example, a program running on a first server, debugged within the first debugging interface of the client, calls upon heterogeneous device resources on the first server, or a program running on a second server, debugged within the first debugging interface of the client, calls upon heterogeneous device resources on the second server.

[0054] For example, return to the reference. Figure 2 In the unified debugging interface of the gdb client, program A running on gdb server 0 calls heterogeneous device resources on gdb server 0. Similarly, program B running on gdb server 1, debugged within the gdb client's debugging interface, calls heterogeneous device resources on gdb server 1.

[0055] For example, while debugging a program on a second server through the first debugging interface, the client maintains communication with the first server. For example, when the user switches to gdb server 1 through the debugging interface to debug program B, the client still maintains a connection with gdb server 0. For example, while the user is debugging program B through the debugging interface, gdb server 0 can still execute related operations for program A.

[0056] For example, in response to a third selection operation on the first debugging interface of the client, the program debugging on the second server is switched back to the program debugging on the first server so that the program debugging on the first server can continue through the first debugging interface.

[0057] For example, a user can switch from the currently running gdb server 1 to gdb server 0 via the debugging interface to debug program A. For instance, while the user is debugging program A via the debugging interface, gdb server 1 can still perform operations related to program B.

[0058] For example, any of the first, second, and third selection operations includes the user entering an operation command on the client's first debugging interface. For instance, the aforementioned operations that establish communication connections between the gdb client and each gdb server, as well as the operations that switch between servers already connected to the gdb client, can all be performed by the user entering operation commands on the client's single debugging interface.

[0059] For example, input commands can include either line commands or menu commands. Line commands, for instance, refer to specific command text entered by the user via the keyboard to perform a specific function or operation. These commands can be used in command-line interfaces or appear in certain graphical user interface (GUI) programs (e.g., graphical debugging interfaces) (e.g., advanced user or developer tools). Menu commands, on the other hand, refer to commands executed by the user clicking on menu items in a graphical user interface. Users can select and execute menu commands by clicking with the mouse or using keyboard shortcuts.

[0060] The program debugging method provided by the above embodiments of this disclosure not only improves the efficiency of debugging work and enhances multitasking capabilities by allowing the same client to connect to multiple servers simultaneously and manage and switch between these multiple servers in a unified user interface of the client, but also enhances the user experience and creates convenient conditions for parallel computing and debugging.

[0061] Return to reference Figure 2At least one embodiment of this disclosure also provides a computer system including a plurality of gdb servers 0 to n and one or more gdb clients (only one is shown in the figure). The plurality of gdb servers 0 to n include a first server (e.g., gdb server 0) and a second server (e.g., gdb server 1). The gdb client can be configured to: connect to the first server in response to a first selection operation on a first debugging interface to debug the program on the first server; and connect to the second server in response to a second selection operation on the first debugging interface to debug the program on the second server.

[0062] For example, program debugging on the first server includes: debugging a first program running on the first server through a client; program debugging on the second server includes: debugging a second program running on the second server through a client, wherein the first program and the second program correspond to different execution processes of the same task.

[0063] For example, while debugging the second server's program through the first debugging interface, the client maintains communication with the first server.

[0064] For example, the gdb client can also be configured to switch back from debugging the program on the second server to debugging the program on the first server in response to a third selection operation on the client's first debugging interface, so as to continue debugging the program on the first server through the first debugging interface.

[0065] For example, any one of the first, second, and third selection operations includes the operation of the user entering an operation command on the first debugging interface of the client.

[0066] For example, input operation commands include either input line commands or menu commands.

[0067] For example, a program running on a first server, debugged within the first debugging interface of the client, calls upon heterogeneous device resources on the first server, or a program running on a second server, debugged within the first debugging interface of the client, calls upon heterogeneous device resources on the second server.

[0068] For example, heterogeneous device resources include various types of accelerator cards.

[0069] For example, communication connections are established through different communication sessions between the client and the first and second servers, respectively.

[0070] For details on the various operating steps in the above-described computer system and their detailed descriptions, please refer to the detailed description of the program debugging method provided in the foregoing embodiments of this disclosure, which will not be repeated here.

[0071] The computer system provided by the above embodiments of this disclosure not only improves the efficiency of debugging work and enhances multitasking capabilities by allowing a client to connect to multiple servers simultaneously and manage and switch between these servers in a unified user interface, but also enhances the user experience and creates convenient conditions for parallel computing and debugging.

[0072] Figure 5 A schematic diagram of a program debugging apparatus provided in at least one embodiment of the present disclosure is shown.

[0073] For example, such as Figure 5 As shown, at least one embodiment of this disclosure also provides a program debugging device for a client, which includes a first connection module and a second connection module. The first connection module is configured to connect the client to a first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and the second connection module is configured to connect the client to a second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0074] For example, debugging a program on a first server includes debugging a first program running on the first server via a client; debugging a program on a second server includes debugging a second program running on the second server via a client. For example, the first program and the second program correspond to different execution processes of the same task.

[0075] For example, while debugging the second server's program through the first debugging interface, the client maintains communication with the first server.

[0076] For example, the program debugging device further includes a first switching module configured to switch back from program debugging on the second server to program debugging on the first server in response to a third selection operation on the first debugging interface of the client, so as to continue program debugging on the first server through the first debugging interface.

[0077] For example, any one of the first, second, and third selection operations includes the operation of the user entering an operation command on the first debugging interface of the client.

[0078] For example, input operation commands include either input line commands or menu commands.

[0079] For example, a program running on a first server, debugged within the first debugging interface of the client, calls upon heterogeneous device resources on the first server, or a program running on a second server, debugged within the first debugging interface of the client, calls upon heterogeneous device resources on the second server.

[0080] For example, heterogeneous device resources include various types of accelerator cards.

[0081] For example, communication connections are established through different communication sessions between the client and the first and second servers, respectively.

[0082] For details on the various operating steps in the above-described program debugging device and their detailed descriptions, please refer to the detailed description of the program debugging method provided in the foregoing embodiments of this disclosure, which will not be repeated here.

[0083] The program debugging apparatus provided in the above embodiments of this disclosure not only improves the efficiency of debugging work and enhances multitasking capabilities by allowing a client to connect to multiple servers simultaneously and manage and switch between these servers in a unified user interface, but also enhances the user experience and creates convenient conditions for parallel computing and debugging.

[0084] Figure 6 A schematic diagram of another program debugging apparatus provided in at least one embodiment of the present disclosure is shown.

[0085] like Figure 6 As shown, the program debugging apparatus 600 according to an embodiment of the present disclosure is used for a client and includes at least one processor 601 and at least one memory 602, wherein the at least one processor 601 and at least one memory 602 can be interconnected via a bus 603.

[0086] Processor 601 can perform various actions and processes according to the program or code stored in memory 602. Specifically, processor 601 can be an integrated circuit chip with signal processing capabilities. For example, the processor 601 can be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), off-the-shelf programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the various methods and steps disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor, such as an x86 architecture, ARM architecture, or RISC-V architecture.

[0087] The memory 602 is used for non-temporary storage of computer-executable instructions, and the processor 601 is used to run the computer-executable instructions. When the computer-executable instructions are executed by the processor 601, the program debugging method provided in at least one embodiment of this disclosure is implemented.

[0088] For example, memory 602 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous interconnected dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). It should be noted that the memory of the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0089] The program debugging apparatus provided in the above embodiments of this disclosure not only improves the efficiency of debugging work and enhances multitasking capabilities by allowing a client to connect to multiple servers simultaneously and manage and switch between these servers in a unified user interface, but also enhances the user experience and creates convenient conditions for parallel computing and debugging.

[0090] At least some embodiments of this disclosure also provide an electronic device that includes the program debugging apparatus of any of the above embodiments. Figure 7 This is a schematic block diagram of an electronic device provided for at least one embodiment of the present disclosure. For example, this electronic device can be used to implement a client-side application as described in the embodiments of the present disclosure. Figure 7 The processing device 701 can be used to implement the program debugging device shown in any embodiment of the present disclosure.

[0091] The following is for reference. Figure 7 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 1 The diagram below shows the structure of the terminal device or server 700. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0092] like Figure 7As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 706 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0093] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 706 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0094] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 706, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.

[0095] The technical effects of the aforementioned electronic devices are the same as those of the aforementioned program debugging methods, and will not be repeated here.

[0096] At least one embodiment of this disclosure also provides a non-transitory storage medium for non-transitory storage of computer-executable instructions. For example, when the computer-executable instructions are executed by a processor, the program debugging method provided in at least one embodiment of this disclosure is implemented.

[0097] Figure 8 A schematic diagram of a non-transitory storage medium provided in at least one embodiment of the present disclosure is shown.

[0098] like Figure 8As shown, the non-temporary storage medium 800 can non-temporarily store computer-executable instructions 810, which, when executed by a computer, implement the program debugging method provided in any embodiment of this disclosure.

[0099] Similarly, the non-transitory storage medium in the embodiments of this disclosure may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. It should be noted that the memory used in the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0100] The technical effects of the aforementioned non-temporary storage media are the same as those of the aforementioned program debugging methods, and will not be repeated here.

[0101] According to one or more embodiments of this disclosure, Example 1 provides a program debugging method for a client, comprising: connecting the client to a first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and connecting the client to a second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0102] According to one or more embodiments of this disclosure, Example 2 provides a program debugging method of Example 1, wherein program debugging on a first server includes: debugging a first program running on the first server through a client; and program debugging on a second server includes: debugging a second program running on the second server through a client, wherein the first program and the second program correspond to different execution processes of the same task.

[0103] According to one or more embodiments of this disclosure, Example 3 provides the program debugging method of Example 1, wherein, during the process of debugging the program of the second server through the first debugging interface, the client maintains communication with the first server.

[0104] According to one or more embodiments of this disclosure, Example 4 provides the program debugging method of Example 1, further comprising: in response to a third selection operation on a first debugging interface of a client, switching from program debugging on a second server back to program debugging on a first server, so as to continue program debugging on the first server through the first debugging interface.

[0105] According to one or more embodiments of this disclosure, Example 5 provides the program debugging method of Example 4, wherein any one of the first selection operation, the second selection operation, and the third selection operation includes the operation of the user inputting an operation command on the first debugging interface of the client.

[0106] According to one or more embodiments of this disclosure, Example 6 provides the program debugging method of Example 5, wherein the input operation command includes any one of the input line command and menu command.

[0107] According to one or more embodiments of this disclosure, Example 7 provides a program debugging method of Examples 1-6, including: a program running on a first server being debugged within a first debugging interface of a client calling heterogeneous device resources in the first server, or a program running on a second server being debugged within a first debugging interface of a client calling heterogeneous device resources in the second server.

[0108] According to one or more embodiments of this disclosure, Example 8 provides the program debugging method of Example 7, wherein the heterogeneous device resources include multiple types of accelerator cards.

[0109] According to one or more embodiments of this disclosure, Example 9 provides the program debugging methods of Examples 1-6, wherein communication connections are established through different communication sessions between the client and the first server and the second server, respectively.

[0110] According to one or more embodiments of this disclosure, Example 10 provides a computer system including: a plurality of servers, including a first server and a second server; a client configured to: connect to the first server in response to a first selection operation on a first debugging interface to perform program debugging on the first server; and connect to the second server in response to a second selection operation on the first debugging interface to perform program debugging on the second server.

[0111] According to one or more embodiments of this disclosure, Example 11 provides a program debugging apparatus for a client, comprising: a first connection module configured to connect the client to a first server in response to a first selection operation on a first debugging interface for program debugging of the first server; and a second connection module configured to connect the client to a second server in response to a second selection operation on the first debugging interface for program debugging of the second server.

[0112] According to one or more embodiments of the present disclosure, Example 12 provides a program debugging apparatus for a client, comprising: at least one memory configured to store computer-executable instructions; and at least one processor configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, implement the program debugging methods provided in Examples 1-9.

[0113] According to one or more embodiments of this disclosure, Example 13 provides an electronic device including the program debugging apparatus provided in Example 11 or Example 12.

[0114] According to one or more embodiments of this disclosure, Example 14 provides a non-transitory storage medium for non-transitory storage of computer-executable instructions, wherein the program debugging methods provided in Examples 1-9 are implemented when the computer-executable instructions are executed by at least one processor. It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code containing at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0115] In general, the various exemplary embodiments of this disclosure can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of this disclosure are illustrated or described as block diagrams, flowcharts, or using some other graphical representation, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0116] In addition to the exemplary description above, the following points should be noted regarding this disclosure:

[0117] (1) The accompanying drawings of the embodiments of this disclosure only involve the structures involved in the embodiments of this disclosure, and other structures can be referred to the general design.

[0118] (2) For clarity, the thickness and dimensions of layers or structures are enlarged in the drawings used to describe embodiments of the present disclosure. It will be understood that when an element such as a layer, film, region or substrate is referred to as being “above” or “below” another element, the element may be “directly” located “above” or “below” the other element, or there may be intermediate elements present.

[0119] (3) Where there is no conflict, the embodiments of this disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.

[0120] The above description is only a specific embodiment of this disclosure, but the protection scope of this disclosure is not limited thereto. The protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A program debugging method for a client, comprising: In response to a first selection operation on the first debugging interface, the client is connected to the first server to perform program debugging on the first server; as well as In response to a second selection operation on the first debugging interface, the client is connected to a second server to perform program debugging on the second server.

2. The program debugging method according to claim 1, wherein, Debugging the first server includes: debugging the first program running on the first server through the client; Debugging the second server includes: debugging the second program running on the second server through the client. The first program and the second program correspond to different execution processes of the same task.

3. The program debugging method according to claim 1, wherein, During the process of debugging the second server through the first debugging interface, the client maintains communication with the first server.

4. The program debugging method according to claim 1 further includes: In response to a third selection operation on the first debugging interface of the client, the program debugging is switched back from the second server to the first server, so as to continue program debugging of the first server through the first debugging interface.

5. The program debugging method according to claim 4, wherein, Any one of the first selection operation, the second selection operation, and the third selection operation includes the operation of the user entering an operation command on the first debugging interface of the client.

6. The program debugging method according to claim 5, wherein, The input operation commands include either input line commands or menu commands.

7. The program debugging method according to any one of claims 1-6, comprising: The program running on the first server, debugged within the first debugging interface of the client, calls upon heterogeneous device resources on the first server, or The program running on the second server, which is being debugged within the first debugging interface of the client, invokes heterogeneous device resources on the second server.

8. The program debugging method according to claim 7, wherein, The heterogeneous device resources include various types of accelerator cards.

9. The program debugging method according to any one of claims 1-6, wherein, Communication connections are established between the client and the first server and the second server, respectively, through different communication sessions.

10. A computer system, comprising: Multiple servers, including a first server and a second server; The client is configured as follows: In response to a first selection operation on the first debugging interface, connect to the first server to perform program debugging on the first server; as well as In response to a second selection operation on the first debugging interface, connect to the second server to perform program debugging on the second server.

11. A program debugging device for a client, comprising: The first connection module is configured to connect the client to the first server in response to a first selection operation on the first debugging interface, so as to perform program debugging on the first server; and The second connection module is configured to connect the client to the second server in response to a second selection operation on the first debugging interface, so as to perform program debugging on the second server.

12. A program debugging device for a client, comprising: At least one memory configured to store computer-executable instructions; as well as At least one processor configured to execute the computer-executable instructions. The computer-executable instructions, when executed by the at least one processor, implement the program debugging method according to any one of claims 1-9.

13. An electronic device comprising the program debugging apparatus of claim 11 or 12.

14. A non-transitory storage medium for non-transitory storage of computer-executable instructions, wherein, When the computer-executable instructions are executed by at least one processor, the program debugging method according to any one of claims 1-9 is implemented.