Mantis - Bisect
Erweiterte Problemanzeige
119 general kleinerer Fehler N/A 2013-06-29 02:34 2013-08-08 12:15
Marc Weber  
xclerc  
normal  
Rückmeldung  
offen  
keine    
keine  
0000119: What about adding a tracing feature?
gasche @irc.freenode.net was so kind telling me about bisect. I was able to adopt the code to make what I need: trace execution points in ocaml code.
So thanks for your nice template.

I'm creating this bug request to tell you that I think this feature could be useful to others. I don't know that much ocaml yet which is why I want to let you decide on whether to integrate it and which is the best way to do so:

http://mawercer.de/tmp/instr.ml [^]
(I've inlined some code and used revised syntax to have one simple file)

The important code change is in decorate_this_expr
Problem-Historie
2013-06-29 02:34 Marc Weber Neues Problem
2013-06-29 02:35 Marc Weber Problemnotiz hinzugefügt: 0000277
2013-08-08 12:15 xclerc Problemnotiz hinzugefügt: 0000279
2013-08-08 12:15 xclerc Bearbeitung durch => xclerc
2013-08-08 12:15 xclerc Status neu => Rückmeldung

Notiz
(0000277)
Marc Weber   
2013-06-29 02:35   
This is the code I talked about. I've stripped off everything I didn't need:

value decorate_this_expr e =
    let buf = Buffer.create 42 in
    let _loc = Ast.loc_of_expr e in
    let () = Format.bprintf buf "%a\n" Loc.dump _loc in
    let s = Buffer.contents buf in
    <:expr< let () = print_string $`str:s$ in $e$ >>;
(0000279)
xclerc   
2013-08-08 12:15   
This would be a very useful feature.

However, I tend to think that it would probably
belong to Bolt (logging tool).