Pycharm and Cherrypy

I'm planning to use CherryPy for a project and was wondering how to set up my Pycharm environment in order to run and debug code using the CherryPy framework?  Right now I'm most curious about how to set up a project, implement some sample code, and then be able to trigger a breakpoint when exercising it via a web browser interface.

Thanks for any information you can provide on how to go about doing the above!

Best regards,

Comment actions Permalink
Hi Mark,  I'm currently working on a CherryPy application myself and found that I didn't really have to do anything special with the PyCharm environment to run and debug the application.  Setting breakpoints in PyCharm work just as you would expect.  In case it helps, following is what I'm currently using for my CherryPy global config and startup (I put this in the __main__ of the startup python file).


    global_conf = {
        'global': { 'engine.autoreload.on': False,
     'server.socket_host': '',
     'server.socket_port': 8080,
     'log.screen': True,



    # mount the application on the '/' base path
    app = cherrypy.tree.mount(Root(), '/', config = application_conf)

    # Initialize signal handler.
    if hasattr(cherrypy.engine, 'signal_handler'):
    # Initialize console control
    if hasattr(cherrypy.engine, "console_control_handler"):

    # Start the engine.
    # Running standalone so we need to block.
Comment actions Permalink
John - I finally had a chance to give this a try last night and it worked as you stated.  I was expecting to have to connect to a remote running process where this isn't the case.  Thanks for the help.  I really appreciate it!


Please sign in to leave a comment.