After lots of manual 'nameko run' runs, a lot of Ctrl+C'ing and an
unpleasant amount of debug-by-print()'ing, I'm trying to get a decent
configuration sorted in my IDE (Visual Studio Code, with Python extension
In case you've not tried vscode (it's quite good!), it allows configuration
of launch profiles. For Python code, this wants:
a) The path to python.exe
b) The 'program' -- i.e., what's passed to python.exe on the command-line
c) Program arguments
d) Other misc. optional stuff (e.g. a launchTask to execute before
debugging starts, arguments for the program, etc.)
...plus, it can do stuff like attach to a running Python
I'm trying to simulate `nameko run --config=config.yml service`, but with
vscode attached to the process to hit breakpoints, allow watches, etc.
Has anyone had any luck with this (or indeed, with a different IDE? The
principles would be the same...)
I tried using vscode's ability to attach to processes, but the debugger
crashes when connecting to nameko's --backdoor-port.
Or am I over-thinking this, and it's best just to add a __main()__ to the
service's module and spin up a container/runner/etc. from there?