debug.C: For debugging C-calls with many arguments.

Description Usage Arguments


Sometimes you call .C with huge numbers of arguments (e.g. when initializing data structures), and you get an error message complaining about one of the arguments. Trouble is, the error message doesn't tell you which one, and it can be hard to track down. A convenient way to find out is to mtrace the caller and run as far as the .C call, then do this at the prompt:

  D(n)> .C <- debug.C

and then hit <ENTER>. All named arguments will be evaluated and summary information will be printed. So you do need to make sure your "important" .C arguments all have names– which is good practice anyway, for matching up the R and C code. Return value is NULL; debug.C doesn't actually try to run any C code. (You wouldn't be using this if your .C worked!)


# This is mandatory, but not useful here. See *Description*
# You would never call 'debug.C' directly



a la .C

Search within the debug package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.