Closed
Description
Feature or enhancement
Proposal:
Currently, when attaching a remote PDB session in _connect(), debug commands are passed indirectly by extending the rcLines list before calling set_trace():
remote_pdb.rcLines.extend(commands.splitlines()) # Indirect
remote_pdb.set_trace(frame=frame)
https://github.com/python/cpython/blob/main/Lib/pdb.py#L3386C1-L3387C42
we can use the following statement:
remote_pdb.set_trace(frame=frame, commands=commands.splitlines())
This change preserves the existing functionality, while improving interface consistency with pdb.
Activity
gh-133926: pass commands via remote_pdb.set_trace instead of using re…
gaogaotiantian commentedon May 12, 2025
Thank you for noticing this.
Chang-LeHung commentedon May 12, 2025
My pleasure. By the way, I love your videos on Bilibili.