From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: [babel] automatically add debugging output Date: Sun, 04 Nov 2012 01:20:22 +0100 Message-ID: <87bofeb4mx.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUnxF-0005qK-MJ for emacs-orgmode@gnu.org; Sat, 03 Nov 2012 20:20:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TUnxE-0006QI-JR for emacs-orgmode@gnu.org; Sat, 03 Nov 2012 20:20:45 -0400 Received: from plane.gmane.org ([80.91.229.3]:53967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUnxE-0006QD-C4 for emacs-orgmode@gnu.org; Sat, 03 Nov 2012 20:20:44 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TUnxG-0002lO-5q for emacs-orgmode@gnu.org; Sun, 04 Nov 2012 01:20:46 +0100 Received: from vpn-2188.gwdg.de ([134.76.2.188]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 04 Nov 2012 01:20:46 +0100 Received: from andreas.leha by vpn-2188.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 04 Nov 2012 01:20:46 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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