arthwang / vsc-prolog

A VS Code extension that provides language support for prolog
MIT License
97 stars 21 forks source link

Can't input queries while debugging. #32

Closed MergeCommits closed 2 years ago

MergeCommits commented 5 years ago

Hello,

Whenever I begin a debugging process in the extension I get this error in the debug console:

ERROR: /.vscode/extensions/arthurwang.vsc-prolog-0.8.23/out/src/features/debugger.pl:11:
    source_sink `library(http/json)' does not exist
Warning: /.vscode/extensions/arthurwang.vsc-prolog-0.8.23/out/src/features/debugger.pl:11:
    Goal (directive) failed: prolog_debugger:use_module(library(http/json))
ERROR: Undefined procedure: prolog_debugger:atom_json_dict/3
ERROR: In:
ERROR:   [10] prolog_debugger:atom_json_dict(_10950,_10958{response:_10966{functionbps:[]}},[])
ERROR:    [9] prolog_debugger:dict_json(_10958{response:_10966{functionbps:[]}},_11002) at /.vscode/extensions/arthurwang.vsc-prolog-0.8.23/out/src/features/debugger.pl:204
ERROR:    [8] prolog_debugger:spy_predicates([]) at /.vscode/extensions/arthurwang.vsc-prolog-0.8.23/out/src/features/debugger.pl:96
ERROR:    [7] <user>
ERROR: prolog_debugger:dict_json/2: Undefined procedure: prolog_debugger:atom_json_dict/3
ERROR: prolog_debugger:dict_json/2: Undefined procedure: prolog_debugger:atom_json_dict/3

Debugging still partly works regardless of this error, as when I write:

tom(cat).

start :-
    tom(cat).

Writing start will work as intended.

However straight-up queries like tom(cat). do not work and produce the error:

tom(cat).
ERROR: Syntax error: Unbalanced operator
ERROR: call((tom(cat)
ERROR: ** here **
ERROR: .)) . 

Not really sure if these two issues are unrelated, since I'm not entirely sure if the latter is an issue with my syntax for queries. Is there something special I need to do for those?

This was done using VSC-Prolog v0.8.23 running on Code v1.30.2, OSX 10.14.2.

Thank you for your time.