Can I make pdb start debugging right away?

Posted by hasen j on Stack Overflow See other posts from Stack Overflow or by hasen j
Published on 2009-03-19T04:12:05Z Indexed on 2010/04/15 17:53 UTC
Read the original article Hit count: 280

Filed under:
|
|
|

I want to debug a python project

The problem is, I don't know where to set a break point,

what I want to do, is be able to call a method

SomeClass( some_ctor_arguments ).some_method()`

and have the debugger be fired right away

How do I do that?

I tried pdb.run( string_command ) but it doesn't seem to work right

>>> import pdb
>>> import <some-package>
>>> pdb.run( .... )
> <string>(1)<module>()
(Pdb) s
NameError: "name '<some-package>' is not defined"

© Stack Overflow or respective owner

Related posts about python

Related posts about debugging