I would like to modify the source code of Python 3.4's built in debugger, pdb
(I'm assuming it's written in Python). I would like to add some code so that when I put:
pdb.set_trace(locals())
in my code, it invokes the standard pdb
interface in the console, and also automatically displays formatted information about my local environment variables similar to the table below.
Can someone point me to the source code for pdb
?
-------------------- Objects: -----------------------------------[2000]
[Name: dog] [Data type: "Dog"] [2100]
+------+-------+-------+-------+------------+------------+
| ID | breed | color | name | size | uuid |
+------+-------+-------+-------+------------+------------+
| 2110 | lynx | black | dog-3 | large!!!!! | e30475ad-9 |
+------+-------+-------+-------+------------+------------+
[Name: cat] [Data type: "Cat"] [2200]
+------+-------+-------+---------+------------+
| ID | breed | color | name | size |
+------+-------+-------+---------+------------+
| 2210 | lynx | black | kitty-5 | large!!!!! |
+------+-------+-------+---------+------------+
-------------------- Lists of Objects: --------------------------[3000]
[Name: cats] [Data type: "list"] [3100]
+------+-------+-------+---------+------------+
| ID | breed | color | name | size |
+------+-------+-------+---------+------------+
| 3110 | lynx | black | kitty-1 | large!!!!! |
| 3120 | lynx | black | kitty-2 | large!!!!! |
| 3130 | lynx | black | kitty-3 | large!!!!! |
| 3140 | lynx | black | kitty-4 | large!!!!! |
| 3150 | lynx | black | kitty-5 | large!!!!! |
+------+-------+-------+---------+------------+
[Name: dogs] [Data type: "list"] [3200]
+------+-------+-------+-------+------------+------------+
| ID | breed | color | name | size | uuid |
+------+-------+-------+-------+------------+------------+
| 3210 | lynx | black | dog-1 | large!!!!! | e30475ad-9 |
| 3220 | lynx | black | dog-2 | large!!!!! | e30475ad-9 |
| 3230 | lynx | black | dog-3 | large!!!!! | e30475ad-9 |
+------+-------+-------+-------+------------+------------+