# Any success using the debugger with the VSC Prolog extension in Visual Studio Code

**URL:** <https://swi-prolog.discourse.group/t/any-success-using-the-debugger-with-the-vsc-prolog-extension-in-visual-studio-code/6121>\
**Category:** Help!\
**Created:** [January 20, 2023, 5:45pm UTC](https://swi-prolog.discourse.group/t/any-success-using-the-debugger-with-the-vsc-prolog-extension-in-visual-studio-code/6121 "2023-01-20T17:45:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JCR](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@JCR](https://swi-prolog.discourse.group/u/JCR)\
**Post date:** [January 20, 2023, 5:45pm UTC](https://swi-prolog.discourse.group/t/any-success-using-the-debugger-with-the-vsc-prolog-extension-in-visual-studio-code/6121/1 "2023-01-20T17:45:59Z")

</div>

Hi!

I really like working with Visual Studio Code and the VSC Prolog extension. Generally things are fine. But when I try to run the debugger I get a “Invalid variable attributes” error.

I have setup a launch.json with the correct runtime executable (under “runtimeExecutable”) and a startup query that exists in the project folder (under “startupQuery”).

I am on MacOS.

Is debugging with VSC Prolog working for you?

Cheers/JC

---

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [January 20, 2023, 7:12pm UTC](https://swi-prolog.discourse.group/t/any-success-using-the-debugger-with-the-vsc-prolog-extension-in-visual-studio-code/6121/2 "2023-01-20T19:12:46Z")

</div>

> [@JCR](#):
>
> Is debugging with VSC Prolog working for you?

I use Visual Studio Code for Windows with the [VSC-Prolog plugin](https://marketplace.visualstudio.com/items?itemName=arthurwang.vsc-prolog) which seems to be designed to do debugging ([ref](https://marketplace.visualstudio.com/items?itemName=arthurwang.vsc-prolog#debugger-settings)) but actually prefer using the SWI-Prolog for [graphical tracer](https://www.swi-prolog.org/gtrace.txt) for debugging.

Maybe one of these days I will switch.

If VSC-Prolog plugin also added a Test Explorer UI ([ref](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer)) then there would be an ever more pressing need/desire to switch.

---

<div class="post-metadata">

**Author:** ![JCR](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@JCR](https://swi-prolog.discourse.group/u/JCR)\
**Post date:** [January 21, 2023, 5:20pm UTC](https://swi-prolog.discourse.group/t/any-success-using-the-debugger-with-the-vsc-prolog-extension-in-visual-studio-code/6121/3 "2023-01-21T17:20:43Z")

</div>

> [@EricGT](#):
>
> but actually prefer using the [SWI-Prolog](https://www.swi-prolog.org/pldoc/doc_for?object=manual) for [graphical tracer](https://www.swi-prolog.org/gtrace.txt) for debugging.

I agree. It is very useful 🙂

I’m not sure if the VSC Prolog plugin for VSC will be updated in the future…

---

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [January 21, 2023, 5:25pm UTC](https://swi-prolog.discourse.group/t/any-success-using-the-debugger-with-the-vsc-prolog-extension-in-visual-studio-code/6121/4 "2023-01-21T17:25:38Z")

</div>

> [@JCR](#):
>
> I’m not sure if the VSC Prolog plugin for VSC will be updated in the future…

I do know the plugin creator, Arthur Wang, has an [account here](https://swi-prolog.discourse.group/u/arthurwang) and might respond. You can always grab the [code](https://github.com/arthwang/vsc-prolog) and tweak it as needed or report an [issue](https://github.com/arthwang/vsc-prolog/issues).

---

<div class="post-metadata">

**Author:** ![Zhang-Liao](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/zhang-liao/32/5542_2.png) [@Zhang-Liao](https://swi-prolog.discourse.group/u/Zhang-Liao)\
**Post date:** [June 7, 2023, 9:53am UTC](https://swi-prolog.discourse.group/t/any-success-using-the-debugger-with-the-vsc-prolog-extension-in-visual-studio-code/6121/5 "2023-06-07T09:53:37Z")

</div>

I also meet the error in Ubuntu.
