Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 21 20:25

    pmoura on master

    Update `lgtunit` tool documenta… (compare)

  • May 21 15:54

    pmoura on master

    Update `lgtunit` tool documenta… (compare)

  • May 21 09:27

    pmoura on master

    Update `lgtunit` tool documenta… (compare)

  • May 21 09:02

    pmoura on master

    Update `tutor` tool for the new… Update SVG diagrams (compare)

  • May 21 08:39

    pmoura on master

    Add linter warnings for missing… (compare)

  • May 20 16:06

    pmoura on master

    Fix `lgtunit` tool QuickCheck i… Update SVG diagrams (compare)

  • May 20 14:01

    pmoura on master

    Fix `arbitrary` library categor… Update SVG diagrams (compare)

  • May 20 10:38

    pmoura on master

    Fix bug in the `arbitrary` libr… (compare)

  • May 19 19:04

    pmoura on master

    Fixes and performance improveme… Update SVG diagrams (compare)

  • May 18 13:36

    pmoura on master

    Change `diagrams` tool `omit_pa… Update SVG diagrams (compare)

  • May 17 16:57

    pmoura on master

    Code refactoring of the check f… (compare)

  • May 17 14:25

    pmoura on master

    Fix cases where predicate name … (compare)

  • May 17 13:13

    pmoura on master

    Improve performance of runtime … (compare)

  • May 17 11:43

    pmoura on master

    Fix `current_predicate/1` and `… (compare)

  • May 17 09:15

    pmoura on master

    Fix bug in previous commit wher… (compare)

  • 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)

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.
A Man With A Clever Disguise
@ACleverDisguise
Probably, yes.
Well, when I'm debugging I will always want to see them. It's when I run just the tester that I'll do it manually.
Paulo Moura
@pmoura
You can always have multiple loader files, e.g. loader.lgt, loader_debug.lgt, ...
A Man With A Clever Disguise
@ACleverDisguise
I was trying to be too tricky for my own good by having a root loader that gets modified depending on if I want to debug, test, etc.
I'll just stop trying to be too DRY.
It's not as if these scripts change a lot.
Paulo Moura
@pmoura
Your loader_debug.lgt file can simply do logtalk_load(loader) +set_logtalk_flag(debug,on)` + ... so you would still use a single root loader file and derive from it in a minmal way.
A Man With A Clever Disguise
@ACleverDisguise
OK, we're back to this.
debug is on, manually confirmed.
Not a single print_message in the debug domain got printed.
If I change it to information, they all get printed.
So even manually turning the debug flag on before loading the tester still gives me tests that don't display debug messages.
Paulo Moura
@pmoura
You can use the object_property/2 predicate to check the properties of the object containing those calls.
A Man With A Clever Disguise
@ACleverDisguise
Not sure what I'm checking for? debugging is set, among a host of others that don't seem relevant.