Giter Site home page Giter Site logo

elinorswery / tutorial-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rookout/tutorial-python

0.0 0.0 0.0 260 KB

Rookout official tutorial for using Python

Python 30.22% CSS 36.30% HTML 11.02% JavaScript 17.54% Makefile 2.99% Dockerfile 1.92%

tutorial-python's Introduction

Rookout tutorial for debugging Python applications

CircleCI License Docs GitHub version

A sample app for debugging Python using Rookout.

Helpful links:

Prerequisites

  1. Python 3.5 or newer
  2. pip
  3. Optional - Docker - https://www.docker.com/get-docker

Setup

  1. Clone the sample app from this repository:
git clone https://github.com/Rookout/tutorial-python.git
cd tutorial-python
  1. Set your Rookout token as an environment variable (for Windows, use set instead of export)
export ROOKOUT_TOKEN=[Your Rookout Token]
  1. 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

Usage

  • Log in to the Rookout IDE.

  • Add the source code according to the instructions using the left pane Source View

    More details

    Adding source code

    1. Click on Add source
    2. 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

  • 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.

Common Pitfalls

  • 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.

Want to learn more ?

License

APACHE 2

tutorial-python's People

Contributors

sonariorobot avatar mickaelalliel avatar itielshwartz avatar yuval-shavit avatar elduderinos avatar hedwigz avatar niryarden avatar rookeret73 avatar bentheklein avatar manuelnemirovsky avatar iglizer avatar zeevmoney avatar liranlast avatar orishavit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.