Re: [eclipse-clp-users] Debugging in embedded eclipse

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Wed, 4 Apr 2018 21:31:58 +0100
On 04/04/18 15:04, Victor Mataré wrote:
> Hello,
> 
> I'm trying to debug/trace eclipse code that is being called from an instance embedded in C++ code, but I can't seem to trigger interactive tracing. trace(p) does not trigger tracing for p, and trace/0 or debug/0 cannot even be called. I.e. in C++ i do:
> 
> post_goal(EC_atom("trace"));
> EC_resume();
> 
> Which results in:
> 
> calling an undefined procedure profile : trace in module eclipse
> 
> However I'm not even sure EC_atom is the correct way of referencing a predicate with arity 0. Can't find anything covering this in the documentation either. trace/0 also seems to be in none of the standard modules, for example when I get a list of all available modules in a plain interactive eclipse:
> 
> [eclipse 14]: findall(M, current_module(M), L), writeln(L).
> [eclipse, sepia_kernel, dfid, eclipse_language, profile, toplevel, ecl_compiler, tracer_tty, suspend, development_support, lists]
> 
> Then trace/0 doesn't seem to be in any of them, i.e. any of eclipse/trace, sepia_kernel/trace, ... yield the same error as above.
> 
> So what's going on here? How do I trace embedded code?


Hi Victor,

trace/0 and debug/0 are not actually predicates, they are commands interpreted 
by the interactive toplevel.  trace/1 is in principle the correct predicate to 
use, but in an embedded situation you have to load any development tools 
explicitly beforehand.

You can use either the command line tools or the graphical tools.  For 
reference, I have summarized the necessary steps on our wiki at

http://eclipseclp.org/wiki/Examples/DebuggingEmbeddedECLiPSeCode

Let me know if anything is unclear!


Cheers,
Joachim
Received on Wed Apr 04 2018 - 20:32:10 CEST

This archive was generated by hypermail 2.3.0 : Tue May 14 2019 - 03:13:25 CEST