I want to use interactive debugging of R code in emacs, and found about ess-tracebug, but can't get it to work. I did the following:
ess-tracebug
C-c C-n
M-c c
, says "Debugging is not active"Here is what I added to my ~/.emacs
file:
(load "/home/user/ess/ess-5.13/lisp/ess-site")
(ess-toggle-underscore nil)
(add-to-list 'load-path "/home/user/emacs/")
(require 'ess-tracebug)
(add-hook 'ess-post-run-hook 'ess-tracebug t)
(define-key ess-mode-map "\M-]" 'next-error)
(define-key ess-mode-map "\M-[" 'previous-error)
(define-key inferior-ess-mode-map "\M-]" 'next-error-no-select)
(define-key inferior-ess-mode-map "\M-[" 'previous-error-no-select)
Any suggestions?
You can enter the debugger when you call the function by calling debug-on-entry . Now, type d again, eight times, slowly. Each time you type d , Emacs will evaluate another expression in the function definition. By typing d , you were able to step through the function.
Start up Emacs without a file argument - just type emacs & at the prompt. Now execute R-mode - enter M-x R Think of M-x as `execute' and `R' for R. Emacs will then ask you for your R Starting Directory - enter the directory where you want to create a new (or open an already existing one) .
I assume you are running R
in an Emacs buffer and you have your script in another buffer. In order to debug with ess-tracebug
you must type M-x ess-tracebug
to start the actual tracebug session.
This should do the job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With