Visual debugger loses source: listing version shown

This seems to happen more and more. I thought it was connected with stepping between modules but this screen shot shows the listing version of a predicate directly below the one I was in that had the source code showing properly.

What have I done to upset the debugger gods? It’s very jarring and upsetting to suddenly have to think extra hard about the variables, at times I have had to have the source code open as I single step kind of defeating the object!

Got the habit of reusing some pattern that doesn’t work? This seems code expanded for a DCG, no? Given the original source, this typically reproduces quite easily. This is normally due to missing logic to restore the source locations in library(prolog_clause). Basically means debugging clause_info/4.

Note that I have been working on a completely new approach to deal with source locations, but this project stalled due to other priorities :frowning:

1 Like

Well I must be doing something wrong I’m sure. Up until recently the debugger has been a lifeline at times with sorting out DCG behaviours. That and debug outpuut!

Sigh. I don’t know. First world problems… :expressionless:

Another option that sometimes causes issues is line-endings that are not expected, such as \r\n (Windows) files when used on Linux/MacOS.

Yet another is user term/goal expansion rules.

I too have run into this problem and while I don’t have a fix or work around that works consistently I did post in here a work around that does work at times.

IIRC in the upper right window I view the frame earlier in the stack, then move back to the current frame. But then again that could be an answer to another problem.