Giter Site home page Giter Site logo

debugmode's Introduction

Debugger for the PDE (Processing Development Environment)

Project Site: http://debug.martinleopold.com
Latest version/Repository: https://github.com/martinleopold/DebugMode

The goal of this project is to develop a working prototype of a Debugger for the Processing Development Environment. It is implemented using the Mode framework of Processing 2.0. One of Processing's main strengths is its suitability for learning and teaching programming and generative design. Having an easy to use debugging feature available should facilitate teaching and understanding program flow in general as well as fixing actual bugs.

This is free software, and you are welcome to redistribute it under certain conditions. See GPLv2 for details.

Supported by Google Summer of Code 2012


Current Release Info:

PROTOTYPE 7 (v0.7.2)
Community release. Updated for Processing 2.0.

INSTALLATION:

  • Requires Processing 2.0 (http://www.processing.org/download)
  • If not already present, create a folder named "modes" inside your Sketchbook folder. (The location of the sketchbook folder is shown in Processing's Preferences dialog)
  • Copy "dist/DebugMode" from the extracted .zip into the "modes" folder.
  • Restart Processing.

TUTORIAL:

  • Create a new sketch or open an example.
  • Switch to "Debug" in the modes menu located at the top right.
  • Add breakpoints to any line inside a function by putting the cursor in it and using the diamond shaped icon from the toolbar. Breakpoints show up as "<>" to the left of your code and the line will get a light grey background.
  • Alternatively, you can double click inside the left-hand bar to toggle breakpoints.
  • Now run your sketch. The execution should stop at the first breakpoint, highlighting its line in yellow and adding an orange arrow to the left.
  • Now is a good time to open the "Inspector", click the icon with an "i" symbol. (Inspector opens...)
  • The Inspector shows a snapshot of all available variables and their values at the location.
  • (Hidden gem:) Double clicking any primitive value in the Inspector lets you edit it!
  • To continue from a breakpoint you can either "Step" or "Continue" (more options in the "Debug" menu). Step will execute the next line and stop again, continue will just go on until another breakpoint is found, doing whatever is set to happen in your sketch.
  • That's mainly it, you can list threads and local variables from the menu at any breakpoint and options for stepping-in and out (of functions) are there too.

IMPROVEMENTS/BUG FIXES:

  • keyboard shortcuts (see Debug Menu)
  • logfiles (located in Sketchbook/modes/debug/logs)
  • debugger activity shown in status line (busy, halted)
  • no longer focus inspector window when toggling it

KNOWN ISSUES:

  • can't set breakpoints on some lines (method definitions, class constructors, empty lines)
  • deleting a line will not remove a breakpoint set on it
  • stepping into print(), println() doesn't return properly and will eventually result in exceptions

PLANNED/UPCOMING FEATURES:

  • "advanced mode" for variable inspector (shows stack trace and all local variables and fields)
  • handle processing types in some way (color, PImage, etc)
  • properly highlight debug button (seems like a processing issue?)

debugmode's People

Contributors

martinleopold avatar

Watchers

James Cloos avatar nomadiccreature 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.