Remote debugging with Python


NameScript location
PyRemoteDebugging<Vortex Studio Installation Folder>\tutorials\Python\PyRemoteDebugging\PyRemoteDebugging.py

This tutorial demonstrates how to remotely connect to Vortex instance using python.

It creates a small graphical remote debugger using Python 3.7.2+ and Qt (PySide2).

It uses the same communication channels of the Remote Debugger to read/write values of fields.

This tutorial limits itself to showing fields of type bool or double of the remote interface.

The Vortex remote package supports both Python 2 and Python 3.
Take note that the Python 2 version will work if and only if a version of PySide2 was already installed in Python 2

When installing new Python packages we will use the general notation "pip install". Depending on your installations of Python you may need to use different notation. Refer to https://packaging.python.org/tutorials/installing-packages/ for more information


See Remote Debugger User Guide for more infromation about the remote debugger.

Using the tutorial

Prerequisites

  1. Install the Vortex Remote Pip wheel: pip install <your Vortex Studio installation>/resources/pip_wheels/vortex_remote-<your version>-py2.py3-none-any.whl
  2. Install PySide2: pip install PySide2
  3. Install gRPC: pip install grpcio
    (For more information: https://github.com/grpc/grpc/tree/master/src/python/grpcio)
  4. In the setup file (.vxc) of the node of the  Vortex Application (the Vortex Player Master node is a good example) you want to connect to, check the Enable Remote Access parameter and set a valid Listening Port (e.g. 10023). See Remote Debugger User Guide

Using the Python Remote Debugger

  1. Launch the Vortex Studio Editor (or your application with remote access enabled)
  2. Load some content and start the simulation.
  3. Launch script PyRemoteDebugging.py
    1. Connect to the Vortex Application by entering the remote application's address and port (e.g.: localhost:10023) in the GUI.