개발

비주얼스튜디오코드 VSC-prolog 사용법(맥북)

콘2조아 2021. 9. 17. 14:26

VSC(VisualStudioCode)에서 prolog를 돌리는 방법이다.

과제를 하다가 swi를 써야했는데 VSC에서 바로 실행이 되지 않아서 인터넷을 찾아봤다.

맥 환경에서 설정하는 방법이다.

 

먼저 swi를 다운로드한다. (https://www.swi-prolog.org/download/stable)

비주얼스튜디오코드에서 VSC-prolog 익스텐션을 받는다.

extension 설정에서 경로를 다음 경로로 바꾸어 준다.

/Applications/SWI-Prolog.app/Contents/MacOS/swipl

파일로 돌아와 alt+x, l 을 차례로 눌러주면 작동한다.

 

참고: https://stackoverflow.com/questions/56048383/vsc-prolog-on-macos-mojave-error-path-to-executable-was-not-found

 

VSC Prolog on MacOS Mojave error: "path to executable was not found"

I installed the VSC Prolog extension for Visual Studio code on MacOS Mojave. I get this error: Cannot lint the prolog file. The Prolog executable was not found. Use the 'prolog.executablePath' set...

stackoverflow.com