I'm working on a tool that's invoked primarily from the command line and scripts. The easiest way for me to interact with it is through the console. So in PyCharm, this is fairly easy to do, just Tools->Run Python Console... Then I can work with my code directly in there as per normal.
The problem is that PyCharm doesn't really seem to get me anything over running from the regular Python console! I really want to be able to set a breakpoint in my code, so I could do something like this:
D:\Tools\Python27\pythonw.exe -u C:\Program Files (x86)\JetBrains\PyCharm 1.2.1\helpers\pydev\console\pydevconsole.py 52626 52627
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Program Files (x86)\\JetBrains\\PyCharm 1.2.1\\helpers', 'D:\\Code\\Python\\PyHello'])
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32
>>> from fibo import Fibo
>>> fib = Fibo(boundary=10)
Pretty straightforward. But I'd like to set a breakpoint in the __init__ or show() functions and that doesn't work. Is there a way to start the console in debug mode?
I found this thread, but it's not quite what I want to do: that involves starting a debug session first, then opening the shell afterwards. I want to be able to debug from right within the console.