Then I can use the predicate fine. If I try to use it within a file called analyser.pl, then I get problem. The second file has:
:- module(analyser,_)
(We assume that you are really putting the '.' at the end of :- module(analyser,_) of course and this is just a typo in the message: you would get a syntax error.)
:- use_module(plusdebug).
... in a predicate later debugger([some,data]), ...
The predicate in analyser.pl always fails. Am I missing something about how modules work and how to import predicates from one module into another?
Your understanding of modules is correct. But if you had a module access problem your predicate would not fail: you would get a compile-time error saying that debugger/1 is not imported. So, your predicate is most probably not failing bacause debugger/1 is not accessible, but for some other reason. You can always use the (source) debugger to find out where the failure comes from. If you still have problems if you send us the whole program we can probably find it for you. Hope this helps.