python - Why is pdb displaying "*** Blank or comment" when I try to set a Break? -
I am working with my Django app. For some reason an element of a list is being assigned incorrectly.
I am trying to set a break where I think the error is happening. (Line 20)
I am implementing PDB with this line of code:
import pdb; Pdb.set_trace ()
However, inside the code, I can not set the break
(PDB) B20 *** blank or comment ( PDB) Break 20 *** blank or comment `
What am I doing wrong?
PDB is telling you that the file you are in is not a code; It is either empty or just contains a comment. Such a line will not actually be executed, so a breakpoint can not be set on it.
Use the 'list' command to view the file's code which you currently set to the 'support list' for this command description, and then set the breakpoint to lines that contain executable code Are there.
You can also use the 'where' command to see the stack frame, because you are not in the correct file. You are not looking at the stack frame level, where you think you are. Use 'up' and 'down' to move to the stack level where you want to debug.
Comments
Post a Comment