Multithread Program Debugging with Parallel Thread Timelines
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multi-thread concurrent execution scenarios, existing debugging technologies struggle to distinguish specific threads, making it difficult to debug programs effectively due to the inability to intuitively display time sequences and relationships between threads.
Innovation Solution
A program debugging method and apparatus that utilize separate timelines for each thread, displaying breakpoints and code line information on parallel timelines to visually represent thread behaviors and debugging information, enhancing debugging efficiency and visual clarity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If breakpoint debugging is used in multi-thread concurrent execution scenarios, then the developer can check code in a stepwise manner, but the specific thread corresponding to a to-be-observed variable cannot be distinguished
Solution Approach 1:
The patent divides the single debugging view into multiple thread-specific views, where each thread's execution context is segmented and displayed separately. This allows the developer to distinguish which thread is executing which code, resolving the information loss about thread identity in multi-threaded debugging scenarios.
Solution Approach 2:
The patent introduces a new dimension (thread dimension) to the traditional single-line debugging view. By adding thread identification as an additional dimension to the code position, the debugging interface can simultaneously display multiple threads' execution states without losing thread-specific information.
2Productivity
If traditional debugging interface is used, then the interface is simple, but the visual effect and debugging efficiency in multi-thread scenarios are poor
Solution Approach 1:
The debugging interface is segmented into multiple independent timeline components, each representing a thread's execution path. This segmentation improves debugging efficiency by allowing developers to quickly locate thread-specific issues while maintaining a manageable interface structure through modular design.
Solution Approach 2:
The patent adds a timeline dimension to the traditional code position display, creating a two-dimensional debugging view (code position + thread timeline). This dimensional enhancement provides better visual effect and debugging efficiency without excessively increasing interface complexity, as the additional dimension is integrated systematically.
Data Source
Figure 1(a)
Figure 1(b)~1(c)
Figure 2
AI summary
This application relates to the field of program debugging technologies, and provides a program debugging apparatus, a program debugging method, and a program development product. The program debugging method includes: in response to a first debugging operation for a target program, debugging the target program to pass a first target code position in a first code file corresponding to the target program; and displaying at least a first timeline and a second timeline that correspond to the first target code position, where the first timeline corresponds to a first thread that runs the target program, and the second timeline corresponds to a second thread that runs the target program. When a program relates to multi-thread concurrent execution, a program debugging process is displayed in two manners: timeline-based display of threads corresponding to a plurality of timelines, for example, at least the first timeline and the second timeline, in combination with a breakpoint on a timeline and code line information of the breakpoint. This improves visual effect of a debugging function of an integrated development environment and efficiency of locating, by a developer, an exception or a problem in code.