Search code examples
pythondockerspyderremote-debugging

Can we remotely run and debug Python code from a Docker container using Spyder


JetBrains PyCharm is able to remotely run and debug Python code from inside a Docker container. Also, it is able to do the same task using an Anaconda environment.

I would like to ask if it possible to perform such a task (using either Anaconda or Docker) with the Spyder IDE.

My objective is to run and debug Python code using a Docker container that lives remotely to a different machine. The Docker container contains the appropriate Python interpreter as well as the Python modules I need.

Please help.


Solution

  • According to the spyder doc it is possible for conda environment using ssh : http://docs.spyder-ide.org/ipythonconsole.html#connect-to-an-external-kernel.

    For Docker container the same steps should work according to this issue.

    But I have not tried this myself.

    EDIT : Otherwise, if you like to edit your remote code as well as running it. You can use Visual Studio Code Insider (available here) It is a preliminary version of what should be included natively in Visual Studio Code soon.