python - How do you set up Pycharm to debug a Fabric fabfile on Windows? -


is possible set pycharm step through a fabric fabfile.py?

it seems doable run/debug configuration editor can't seem settings right. editor asking script run , i've tried fab-script.py file giving me fab options.

it seems i'm close not quite there.

here how ended setting in case useful else. things this, once know magic settings, easy. these instructions through pycharm several of them can done in alternate ways. however, since debugging in pycharm, that’s i’m using instructions. also, i’m using windows.

install fabric package project environment (using settings-->project interpreter package installation). installs fabric virtual environment’s site package folder putting fab.exe , fab-script.py file in /scripts folder. find location of fab-scripts.py file , copy path (something “c:\\scripts\fab-script.py”)

now, create run configuration (run --> edit configuration… --> python) script file name. script parameters point fabfile.py , command execute/debug. script parameters are: -f fabfile dev:"mybranch1" deploy allows me debug “dev” task “mybranch1” parameter run “deploy” task. replace dev:"mybranch1" deploy whatever task name is. working directory points project folder fabfile.py located (at least configuration). setup looks this.
rundebug configuration

open fabfile.py , put breakpoint stop debugger. in case, since i’m debugging deploy task, put breakpoint there. enter image description here

now debug fab run, set active configuration 1 made , click debug. enter image description here

when breakpoint hit, off , debugging fabric fabfile.py pycharm

when ready run debugged fabfile, open terminal , run fab command parameters used in debugging. again, point command prompt @ project (working) directory. (note: fab.exe in scripts folder needs executable command line – having in environment variables path property) enter image description here


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -