From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: [babel] automatically add debugging output
Date: Sun, 04 Nov 2012 01:20:22 +0100 [thread overview]
Message-ID: <87bofeb4mx.fsf@med.uni-goettingen.de> (raw)
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
next reply other threads:[~2012-11-04 0:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-04 0:20 Andreas Leha [this message]
2012-11-04 0:52 ` [babel] automatically add debugging output Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bofeb4mx.fsf@med.uni-goettingen.de \
--to=andreas.leha@med.uni-goettingen.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).