You can't start the PlDoc server from the PDT console!
consult('<full path to prolog file>').
The easiest way: Consult the file in Eclipse and copy-paste the entire
consult line as shown at the top of the following snapshot.
And paste it into the terminal window.
(Ok, this second screenshot is fake, but you know what we mean )
doc_browser.This does the same.
Because it is more familiar, we should use the JavaDoc style. So the example from the SWI site should be for us:
/** length(+List:list, -Length:int) is det. * length(?List:list, -Length:int) is nondet. * length(?List:list, +Length:int) is det. * * True if List is a list of length Length. * * @compat iso */
Expected number of bindings:
|determinism||number of bindings||choice-point after last success|
During the first presentation of PlDoc we got “Internal Server” errors telling us, things like “Undefined procedure: $pldoc/4”. It looks like the developer forgot to declare the predicates that he dynamically generates as dynamic. You can easily repair that. Just enter in your console:
dynamic '$pldoc'/4. dynamic '$mode'/2.
To summarize, here is what you should enter into your console:
doc_collect(true). doc_server(8711). doc_browser. dynamic '$pldoc'/4, '$mode'/2.
Don't forget to consult your prolog code afterwards.