A sample app for debugging Python using Rookout.
- Python 2.7.14 or newer
- pip
- Optional - Docker - https://www.docker.com/get-docker
- Clone the sample app from this repository:
git clone https://github.com/Rookout/tutorial-python.git
cd tutorial-python
- Set your Rookout token as an environment variable (for Windows, use set instead of export)
export ROOKOUT_TOKEN=[Your Rookout Token]
- Run the app:
pip install -r requirements.txt
python app.py
- Optional - Run the app using Docker:
docker run -p 5000:5000 -e ROOKOUT_TOKEN=$ROOKOUT_TOKEN rookout/tutorial-python
-
Log in to the Rookout IDE.
-
Add the source code according to the instructions using the left pane Source View
More details
- Click on Add source
- Choose source control
- Github
- Click on Connect
- Authorize O-Auth
- Fill
Repository Owner
- Click
Repository
and choose from the dropdown menu - Click Next
- Choose the desired branch
- Click View Repository
- Local FileSystem - Server
- Click on Setup Server
- Choose a supported HTTP Server
- Follow the on-screen instructions
- Github
-
Open the file
app.py
-
Add a Snapshot Breakpoint next to line number 84 by clicking next the the line number in the file viewer
-
Looking at the right-hand pane Breakpoints, you will see the Breakpoint you added, on what line you added it and it should be GREEN, meaning everything is communicating correctly.
- If this is not the case, click here to see how to fix that
-
Go the the app webpage http://localhost:5000/ and add a todo in order to trigger the Breakpoint
-
Check the bottom pane Messages and you'll see the snapshot you just added, as it was triggered by the handler of the web api when you added a todo
Go through the bug list and follow instructions to see some basic use cases.
- Breakpoint status is RED -- Hash mismatch. It means the file used in the server is not the same file used from github/local server in app.rookout.com
- Breakpoint status is GRAY -- No app connected. Make sure you have inserted the Rookout Token in the right place and that connection is made properly.
- Our documentation for more information
- our deployment examples for platform-specific integration examples