Sommaire

Start and debug your application

Start your newly created application

Once the “application_helper” script has finished, a folder containing the application code was created in the shared folder.

To launch this application, it is necessary to run the “start_app.sh” script at the root of the application. It will run two python process :

This script must be run from the VM and not from the host machine ! You can either connect in ssh to the virtual machine to launch the script or create a shortcut on your Pycharm IDE.

Here are the steps to follow to configure this shortcut :

The variables.env file

When an application is created with the “application_helper” scrit a file called “variables.env” is created at the root of this application. This file contains all the variables needed by the “start_app.sh” script.

These variables correspond to the following :

Do not push this file to your git ! Each member of your team has his own database with its own credentials.

Debug your application

The problem is that your application is not running the same machine as your IDE. Don’t worry (be happy), there is a solution : configuring a remote python interpreter.

Here is how :

Remember of our start_app.sh ? Bad new : we can’t combine remote python interpreter and this script in Pycharm. So we have to create two debug run configuration (one for each process) inside our IDE :