I'm new to debugging flask with pycharm, so hopefully nothing I ask is too trivial.
I have two files
code/__init__.py and code/runserver.py
In the __init__ file is the where my Flask app is initialized meaning that is where the statement :
app = Flask(__name__)
In the runserver.py file is where I have the statement
if __name__ == '__main__':
The runserver imports the app in the following manner :
from code import app, __app_name__, __version__
Inside of the main function are a number of parser.addoption commands and then ultimately
parser = OptionParser()
parser.add_option("-d","--debug",action="store_true",default=app.config.get('DEBUG',True),dest="debug",help="Turn on debugging")
(options,args) = parser.parse_args()
In this case what would my entry point for debugging the application be?
I assumed it would be runserver.py but when I attempt to debug this I get the response of
ImportError: No module named code
If however I run it like
I don't have any issue.