Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are good options for debugging urwid applications?

My current makeshift approach is logging to a textfile, but that isn't very interactive. I've tried using pdb, but that doesn't seem to get along with urwid, pdb doesn't take any input once it hits a breakpoint.

like image 327
imrek Avatar asked Apr 05 '17 17:04

imrek


1 Answers

A couple of practices down the line... Debugging urwid is strange and not really well possible in the classical sense, most of the time after rendering the canvas you can't really check things anymore.

What helped me:

  • Routing errors into a file. If you get exceptions and want to understand what, where and how, nice implementation is given here: https://stackoverflow.com/a/12877023/5058041
  • Really try to understand what your modules are and how you want to achieve things. Reading the documentation for the n+1-time is a good idea.
  • Look at the implementation of the widgets you use. Often they have some more information.

I know that doesn't really count as debugging, but it helped me a lot in finding errors or strange behavior.

like image 71
freistil90 Avatar answered Nov 14 '22 23:11

freistil90