How add SWI-Prolog terminal in VSCode?
Asked Answered
T

1

6

How can an SWL-Prolog terminal be added in VSCode?

Like PowerShell but SWI-Prolog terminal.

Tetartohedral answered 13/12, 2020 at 10:23 Comment(2)
Great question, perhaps you should also join the SWI-Prolog forumTrocki
You want to build a shell with swi-prolog running (instead of power-shell, with DOS/Windows interpretor running) ? This is already what you get when you install swi-prolog in Windows. You can use swi-prolog settings to pre-load your application, and even start your code to have some menu etc. Otherwise, you have to hack into the swi-prolog source codes to personnalize even further the shell.Subdivide
T
10

To create an SWI-Prolog terminal within Visual Studio Code, the process is the same as starting an SWI-Prolog terminal from a DOS prompt but you just start by creating an initial terminal in VSC.

  1. Using VSC menu Terminal > New Terminal
    or Ctrl+Shift+`

  2. Start SWI-Prolog from the command line using swipl

Microsoft Windows [Version 10.0.19041.685]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\Groot>swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.8)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).     

1 ?- 

If you have an existing terminal open and want to add another terminal then in the upper right of the terminal

enter image description here

click on + and then at the command prompt > enter swipl.

Your terminal selector will now have an added swipl option.

enter image description here

Trocki answered 13/12, 2020 at 11:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.