# Run\_tests immediately fails

**URL:** <https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721>\
**Category:** General\
**Created:** [August 23, 2024, 11:41am UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721 "2024-08-23T11:41:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![grossdan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/grossdan/32/23_2.png) [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Post date:** [August 23, 2024, 11:41am UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/1 "2024-08-23T11:41:33Z")

</div>

Hello,

I reinstalled my computer and installed Eclipse and PDT. I have code for which i wrote extensive tests. Trying to run the tests after reinstall doesn’t work anymore.

run\_tests.

Immediately fails.

Tracing it shows that it gets to a map\_list(Goal, List1, List2) prediate which then fails – i.e. no test is called.

Any thoughts on what the issue might be is much appreciated,

Dan

---

<div class="post-metadata">

**Author:** ![brebs](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@brebs](https://swi-prolog.discourse.group/u/brebs)\
**Post date:** [August 23, 2024, 6:17pm UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/2 "2024-08-23T18:17:55Z")

</div>

> [@grossdan](#):
>
> map\_list

Do you mean maplist/3 or your own custom predicate?

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 24, 2024, 11:00am UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/3 "2024-08-24T11:00:13Z")

</div>

Could it be that you enabled optimization and did not tell the test framework that you want the tests loaded, despite optimization?

I think this should be reconsidered. The original idea is that tests may be embedded in source files and we want to skip loading these for production. That is still fine. It should probably not apply to files that are there only for testing purposes. It is not easy to distinguish the two though. Most of my testing is in normal Prolog files that load the module(s) to be tested and defines the tests.

---

<div class="post-metadata">

**Author:** ![grossdan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/grossdan/32/23_2.png) [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Post date:** [August 24, 2024, 5:55pm UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/4 "2024-08-24T17:55:21Z")

</div>

Thanks Jan,

No, swipl-win.exe is started within eclipse without any command line arguments – so, optimization is not enabled.

The only thing I did that is different to the past is download a version of eclipse: Version: 2.3.1600.v20231201-0110

Which I think is somewhat more recent than the one i used before reinstalling the computer.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 24, 2024, 5:59pm UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/5 "2024-08-24T17:59:16Z")

</div>

Please start not using Eclipse. That simplifies what we are talking about …

---

<div class="post-metadata">

**Author:** ![grossdan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/grossdan/32/23_2.png) [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Post date:** [August 24, 2024, 6:01pm UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/6 "2024-08-24T18:01:50Z")

</div>

Can vs-code be used to work with an interactive debugger?

If yes, are there any instructions on how to configure and use vs-code for swi prolog?

ps.

was there any change in Eclipse – i used to work with it very well but now i notice issues – the latest version of eclipse removed many UI elements that I liked such as (re)consult commenting/uncommenting blocks and others.

---

<div class="post-metadata">

**Author:** ![anon419083](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@anon419083](https://swi-prolog.discourse.group/u/anon419083)\
**Post date:** [August 24, 2024, 6:17pm UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/7 "2024-08-24T18:17:29Z")

</div>

In VS-Code there is an extension for syntax highlighting and things like that. If you want to debug or trace your code you can use the integrated Terminal. From there you work exactly as you would from the Terminal (in MacOs) or I think Command Prompt in Windows: you can type swipl to start an interactive session, you can load files, trace or gtrace code.

This is the extension:

> **[New-VSC-Prolog - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=AmauryRabouan.new-vsc-prolog#grammar-linter)**
>
> Extension for Visual Studio Code - Support for Prolog language

---

<div class="post-metadata">

**Author:** ![grossdan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/grossdan/32/23_2.png) [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Post date:** [August 24, 2024, 6:37pm UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/8 "2024-08-24T18:37:11Z")

</div>

Thank you.

The truth is, I liked the eclipse editor with the PDT addon – I preferred it over the built in emacs lik,e editor.

I worked with Eclipse for a number of years very productively. Its a pity that somehow Eclipse is not supported anymore.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [August 25, 2024, 7:07am UTC](https://swi-prolog.discourse.group/t/run-tests-immediately-fails/7721/9 "2024-08-25T07:07:29Z")

</div>

> [@grossdan](#):
>
> Can vs-code be used to work with an interactive debugger?

All I’m asking is to simply run the code using `swipl-win.exe` or `swipl.exe`. Both the PDT Eclipse plugin and the vs-code plugin actively (re)load code AFAIK, so possibly it is messing up something.
