emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [babel] automatically add debugging output


From: Andreas Leha
Subject: [O] [babel] automatically add debugging output
Date: Sun, 04 Nov 2012 01:20:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Hi all,

is it possible to have babel add debugging lines during execution?

Consider this example with an enabled debug property:
#+PROPERTY: session *R*
#+PROPERTY: debug yes

* Some code blocks
#+name: codeA
#+begin_src R
  sum(1)
#+end_src

#+name: codeB
#+begin_src R
  sum(2)
#+end_src

When executing the subtree with C-c C-v s, for example, I'd like babel to
automatically add some print() statements, so that executed is
,----
| print("entering codeA")
| sum(1)
| print("leaving codeA")
|
| print("entering codeB")
| sum(2)
| print("leaving codeB")
`----

As there is a print statement in most languages, this should be possible
quite universal for any language.



Also handy would be the insertion of breakpoints
(maybe #+PROPERTY: interactive-debug yes)
In R that would lead to the execution of:
,----
| browser()
| sum(1)
|
| browser()
| sum(2)
`----


Are these things possible?
(Or better question:  How are these things possible?)


Regards,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]