We describe a programming environment for Prolog, a common logic programming language. The services offered by our system assist a Prolog user in the tasks of composing, editing, and storing logic (rule-based) programs, as well as in the control of their execution for debugging purposes. In order to facilitate effective debugging of Prolog programs, we propose a new model of computation that can handle both pure Prolog and impure (side-effect causing) Prolog operations quite gracefully. This model employs two stacks representing the state of a computation with respect to the two major activities of Prolog execution: recursion and backtracking. This representation, in addition to being quite clear and intuitive, is easy to display on a terminal's screen and can be further processed. We also describe a Prolog oriented editor with which the user may easily create and update Prolog source programs and, further, inspect states of computation as generated by the debugger. © 1985, ACM. All rights reserved.