Python debugger: Stepping into a function that you have called interactively

And I’ve answered my own question! It’s the “debug” command in pydb: ~> cat -n /tmp/test_python.py 1 #!/usr/local/bin/python 2 3 def foo(): 4 print “hi” 5 print “bye” 6 7 exit(0) 8 ~> pydb /tmp/test_python.py (/tmp/test_python.py:7): <module> 7 exit(0) (Pydb) debug foo() ENTERING RECURSIVE DEBUGGER ————————Call level 11 (/tmp/test_python.py:3): foo 3 def foo(): ((Pydb)) s … Read more

Viewing an Android database cursor

Android has provided a specific class just for debugging Cursors. It is called DatabaseUtils. Call the method DatabaseUtils.dumpCursorToString(cursor) to view the contents of your cursor. This helper loops through and prints out the content of the Cursor for you, and returns the cursor to its original position so that it doesn’t mess up your iterating … Read more

Android Kernel Debugging

Android Kernel questions are rare on [SO], asa nobody else has answered I have provided my findings on this issue. Unfortunately I don’t have a nexus one to test this on so this answer is not intended as a step by step resolution of you problem, but should point you in the right direction of … Read more

What is “initiator other” in network in chrome console?

“Initiator Other” usually means the network request was made from a user, not from Chrome, a redirect or a script. The request was fired when someone clicked a button (this is what your analytics is probably tracking). You can read more about this in the Chrome DevTools docs. Initiator: The object or process that initiated … Read more

List comprehension scope error from Python debugger

In Python 3, you have to use the interact command in pdb before you can access any non-global variables due to a change in the way comprehensions are implemented. >>> def foo(): [][0] … >>> foo() Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “<stdin>”, line 1, in foo IndexError: list … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)