Virtual Debug

To use virtual debug, you need to trace your program with --vdb using viztracer

vdb <your_json_report>

You can use the following commands in the interactive shell:

(They are very similar to pdb)

s

single step to next function entry/exit

sb

single step back to last function entry/exit

n

go to next function entry/exit without entering other function

nb

go to last function entry/exit without entering other function

r

go forward and return to the caller function

rb

go backward and return to the caller function

t [<timestamp>]

if <timestamp> is not specified, display current timestamp, otherwise go to the time specified by <timestamp>. <timestamp> has the unit of us.

tid [<tid>]

if <tid> is not specified, list the current thread ids in the current process, otherwise go to the thread at the current timestamp

pid [<pid>]

if <pid> is not specified, list the current process ids, otherwise go to the first spawned thread in the specified process at the current timestamp

w

list the call stack with > showing the current frame

u

go up a level to inspect the outer frame

d

go down a level to inspect the inner frame

counter

print the counter recorded at the current timestamp

object

print the objects recorded at the current timestamp

a, arg, args

print the function args logged in VizTracer

q, quit, exit

exit the program