Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 16 17:47

    pmoura on master

    Add support for calls to the da… (compare)

  • May 14 21:28

    pmoura on master

    Fix bugs in the implementation … (compare)

  • May 12 22:18

    pmoura on master

    Update `ports_profiler` tool do… Update SVG diagrams (compare)

  • May 12 11:49

    pmoura on master

    Add support for printing clause… (compare)

  • May 11 21:45

    pmoura on master

    Update `errors` example to illu… (compare)

  • May 10 20:36

    pmoura on master

    Generalize linter check for `fi… (compare)

  • May 09 09:46

    pmoura on master

    Fix wrong arity in the compiler… (compare)

  • May 08 13:43

    pmoura on master

    Fix definition of the `os::cpu_… (compare)

  • May 07 19:01

    pmoura on master

    Update the `optionals` library … (compare)

  • May 07 18:44

    pmoura on master

    Update the `expecteds` library … (compare)

  • May 07 08:44

    pmoura on master

    Update documentation and sample… (compare)

  • May 07 08:27

    pmoura on master

    Update the aliases` example tes… (compare)

  • May 06 13:37

    pmoura on master

    Improve API documentation of th… (compare)

  • May 06 10:42

    pmoura on master

    Improve API documentation of th… (compare)

  • May 06 09:06

    pmoura on master

    Minor code cleanup of the `meta… (compare)

  • May 05 20:44

    pmoura on master

    Improve `lgtdoc` tool linter wa… Update SVG diagrams (compare)

  • May 05 20:31

    pmoura on master

    Rename `code_metrics` tool `ent… (compare)

  • May 05 17:19

    pmoura on master

    Fix typos in the `mode/2` direc… (compare)

  • May 05 17:15

    pmoura on master

    Fix typo in the `mode/2` direct… (compare)

  • May 05 17:06

    pmoura on master

    Fix typo in the `mode/2` direct… (compare)

A Man With A Clever Disguise
@ACleverDisguise
Used .exe for Windows and .deb for Mint, yes.
Different issue I can't fathom: I'm trying to print debug messages. It's not working. I've compiled the .lgt file with debug(on) in the options. I've manually added set_logtalk_flag(debug, on) in the load script. I am manually TYPING set_logtalk_flag(debug, on) in the toplevel. I am checking that current_logtalk_flag(debug, X) binds 'on' to X.
But all of my print_message(debug, component, Message) calls aren't doing a thing.
If I switch that to information, say, it works.
What step am I missing that makes debug messages display? Does it need to be run in the context of the debugger?
Paulo Moura
@pmoura
Printing of debug messages is indepedent of the debugger (which is an application).
You also don't need to compile code that calls logtalk::print_message(debug, component, Message)in debug mode.
Paulo Moura
@pmoura
You may also want to simplify the calls by defining a predicate shortcut. For example:
:- uses(logtalk, [print_message(debug, foo, Message) as dbg(Message)]).
Printing of debug message requires the debug flag to be on when the call is made, not when the code making the calls is compiled.
A Man With A Clever Disguise
@ACleverDisguise
I'm still completely unable to get debug messages to print. information, warning, error, etc. all do, but debug don't.
Paulo Moura
@pmoura
Maybe put the minimal code required to reproduce the issue in a public paste bin?
A Man With A Clever Disguise
@ACleverDisguise
Before that, just a quick question: in my debug.lgt file:
:- initialization((
    logtalk_load(loader),
    logtalk_load(debugger(loader)),
    set_logtalk_flag(debug, on),
    debugger::trace
)).
Paulo Moura
@pmoura
Isn't the loader file loading the code that you want to debug?
A Man With A Clever Disguise
@ACleverDisguise
The loader file loads the library, yes, and compiles it with debug.
Then in the debug file I load the debugger and set the debug flag.
Paulo Moura
@pmoura
Ok.
A Man With A Clever Disguise
@ACleverDisguise
But in circumstances I'm trying to characterize now, when I do current_logtalk_flag/2 I get 'off'.
And that is likely the source of my problems. But I can't figure out when it's turning the flag off.
Paulo Moura
@pmoura
In that initilization/1 directive above, you're turning on the debug flag globally.
A Man With A Clever Disguise
@ACleverDisguise
Yes. That's what I was expecting.
I want my debug messages to display while I'm debugging.
Paulo Moura
@pmoura
After you load the file above containg that initilization/1 directive, current_logtalk_flag(debug,on) should be true and your debug messages should be displayed.
A Man With A Clever Disguise
@ACleverDisguise
There's a path that somehow gets me to that flag being off.
I haven't figured it out, but that's the source of the problem.
The flag is turned off at some point in operations.
Paulo Moura
@pmoura
Nothing in that directive would do that.
Do you have some code compiled in optimized mode?
A Man With A Clever Disguise
@ACleverDisguise
I mess around with {*}, {?}, and loading other helper scripts (like my tester), so one of those may be turning it off again.
Just the library code.
Paulo Moura
@pmoura
And you have debug calls in that library code that you're compiling in optimized mode?
A Man With A Clever Disguise
@ACleverDisguise
No, I mean YOUR standard library. :D
Paulo Moura
@pmoura
Ok.
A Man With A Clever Disguise
@ACleverDisguise
:- initialization((
    logtalk_load([
        dictionaries(loader),
        types(loader)], [optimize(on), debug(off)]),
    logtalk_load([
        two3tree
    ], [optimize(off), debug(on)])
)).
That's the loader script.
Paulo Moura
@pmoura
So, the debug calls that are not printing are iside your application objects?
A Man With A Clever Disguise
@ACleverDisguise
Yes, or my tests.
Paulo Moura
@pmoura
logtalk_load([dictionaries(loader),types(loader)], [optimize(on), debug(off)]) can simply be logtalk_load([dictionaries(loader),types(loader)]).
A Man With A Clever Disguise
@ACleverDisguise
It defaults to optimize and no debug?
I tend to over-specify to establish intent.
Paulo Moura
@pmoura
No. But the loader files for those libraries already ensure they are compiled in optimized mode.
Is two2tree a single file or a loader file?
A Man With A Clever Disguise
@ACleverDisguise
A single file for now.
OK, I found the path.
Paulo Moura
@pmoura
Ok.
?
A Man With A Clever Disguise
@ACleverDisguise
If I load the tester.lgt by itself the flag is clear because of course it is.
I need to load debug first, then tester, to have the debug flag set.
Paulo Moura
@pmoura
It may be simpler to remove the calls to set_logtalk_flag(debug,on) from those initialization directives and just call this goal at the top-level (assuming here you're doing interactive debugging) when you want to see the debug messages.