Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while using R through the command line

I am working on mirtCAT package in R. I need to debug inside a function in this package called mirtCAT(). There are many function inside this one which are written in c++. I need to see which function is taking which value. That is why I need to debug inside the c++ functions which I am trying to do using gdb. I am referring this document for the same:

http://r-pkgs.had.co.nz/src.html#src-debugging

When I am using the command R --debugger=gdb to start R on the command prompt

It is starting R but I think it is not starting the gcc compiler.

It is throwing the warning :

unknown option '--debugger=gdb'

I have changed my environment path variables for gcc compiler.

Any suggestions anyone have?

P.S. I also referred to this thread: Debugging (line by line) of Rcpp-generated DLL under Windows

Where @Dirk suggests to start R by using command R -d gdb

which is also not working it says::

unknown option '-d'

ARGUEMENT 'gdb' is _ignored_
like image 866
Artiga Avatar asked Aug 26 '15 12:08

Artiga


1 Answers

Try :

gdb Rgui.exe
(gdb) break WinMain
like image 66
Chand Priyankara Avatar answered Oct 13 '22 02:10

Chand Priyankara