title: Is there a command to show the search pointer of every step in Prolog?
body: <p>I'm trying to understand the <strong>exact search order</strong> of Prolog. In my university course script there are shown <strong>traces</strong> that show exactly where the "pointer" is at the moment. Let the following be our database:</p>
  
  <pre><code>a(a, a, b).
  a(a, a, c).
  a(a, a, d).
  a(a, a, e).
  a(a, a, f).
  </code></pre>
  
  <p>Then the <strong>output</strong> of Prolog should be something like this:</p>
  
  <pre><code>?- a(a, a, f).
     a(a, a, b).     fail
     a(a, a, c).     fail
     a(a, a, d).     fail
     a(a, a, e).     fail
     a(a, a, f).     succ
  </code></pre>
  
  <p>Here I can see exactly where prolog is searching right now and whether the unification is possible or not. This view would be very helpful when trying to understand <strong>rules and recursion</strong> in Prolog.</p>
  
  <p>I have tried to use <strong>trace/0</strong>, <strong>trace/1</strong> and <strong>debug/0</strong>. But it just shows me rather confusing and IMO unnecessary information. </p>
  
  <p><strong>Is there a command in Prolog to view something like I mentioned above?</strong> Thanks!</p>