[chirp_devel] How to debug?

Dan Smith
Thu Jan 31 11:04:28 PST 2019


> I am a very experienced software developer, but not with CHIRP, or Python, or Ham radio, so I'm basically a newbie  here. I have written a new driver for the FT-4XR and (eventually) for its siblings. The module successfully reads the radio, but then fails to fill in the GUI memory structures. I tried to use pdb as described at
>      https://docs.python.org/2/library/pdb.html
> by inserting the following line at a point in my module:
>     import pdb; pdb.set_trace()
> The breakpoint is reached, the line after mhy breakpoint is printed,  and the (Pdb) prompt is shown on the console, but I cannot then type in a pdb command: characters are not shown on the console when typed and there is no evidence that the commands are being executed.

This is probably because the driver is running in a different thread than the one that has control of the console (maybe?).

> So, how do you guys debug? What am I doing wrong?

With LOG.debug() statements :)

I'm not a big debugger user myself, so perhaps I'm not the best person to help you with a workaround if you really need to figure out a way to use PBD with chirp.

--Dan




More information about the chirp_devel mailing list