Doing a lot of Prolog development work that requires a lot of debugging, I’m trying to improve the swipl-win console. The git version already fixes a couple of memory management issues in xpce’s class terminal and fixes to the ANSI escape handling to make commandline editing work better (there still seem to be some flaws, probably related to history and paste
, but so far I fail to get reproducible cases).
I have added a Debug menu to provide menu and keyboard shortcut for some common actions I tend to use while debugging. The idea is that this both makes (new) users aware of these features and make debugging more efficient for experienced users. Please check out this version (build from git source or for Windows users try the latest daily build).
The console is in inspired by the Linux terminator console, providing similar splitting behaviour. Terminator however uses Ctrl-click to open a link. At the moment SWI-Prolog allows for simple (left) click. I find myself quite often unexpectedly opening links. Should we also move to Ctrl-click?
Comments on the current behaviour is welcome. What is missing? What is unclear?
If you experience crashes and use Linux or MacOS, please build using AddressSanitizer as follows (assuming source, from the top directory)
mkdir build.asan
cd build.asan
../script/configure
(agree)
ninja
Now you can run src/swipl-win (without installing) from any directory you like. This version is a lot slower, but gives detailed analysis from most memory management issues. While SWI-Prolog itself is pretty clean, xpce is much less …
P.s. I tend to split the console while debugging, running queries in one half and using the other to manage spy points, edit locations, find things, etc.
