US 11,693,759 B2
Providing for multi-process log debug without running on a production environment
Xiao Ling Chen, Beijing (CN); Qi Ye, Shanghai (CN); Wen Ji Huang, Beijing (CN); Heng Wang, Beijing (CN); and Kui Zhang, Tianjin (CN)
Assigned to International Business Machines Corporation, Armonk, NY (US)
Filed by International Business Machines Corporation, Armonk, NY (US)
Filed on May 14, 2021, as Appl. No. 17/320,303.
Prior Publication US 2022/0365865 A1, Nov. 17, 2022
Int. Cl. G06F 11/36 (2006.01)
CPC G06F 11/3624 (2013.01) 18 Claims
OG exemplary drawing
 
1. A computer-implemented method comprising:
determining that a log multi-process debug mode is specified;
obtaining a log file for debugging a source code, wherein the log file includes a plurality of log records including respectively corresponding process identifiers populating a plurality of process identifier fields;
processing the log file by inserting a new log record with a new process identifier into the log file for a created new process;
providing for performance of debugging for the source code based in part on the plurality of process identifier fields; and
switching to a different inferior process while debugging the source code by:
obtaining a target process identifier of the different inferior process;
determining whether the target process identifier is located in a process family tree for the new log record;
in response to determining the target process identifier is located in the process family tree for the new log record, obtaining a child process identifier of the different inferior process;
identifying a located log record included in the log file, the located log record having the new process identifier equal to the child process identifier for the different inferior process; and
updating a debugger current program counter and a debugger current process identifier based on the located log record.