C++ file "debugger" in Rstudio - red underline of first letter of function

rcpp

#1

This question is in reference to the "debugger" for c++ code in RStudio. I am not sure if the term "debugger" is technically right here but, I am referring to the functionality that indicates syntax problems etc. by placing a circled "x" in the sidebar and underlining problematic code with a red line.

So before I cave completely and post the whole problem with a reproducible example, I thought I would try to get a better understanding of what the debugger is trying to tell me. Basically, I am getting a "no matching function for call to..." error when trying to call a custom c++ function (written by me) from another custom c++ function (also written by me) that reside within the same .cpp file. I have noticed that if I try to call a function that does not exist at all, the debugger gives the same error and underlines the WHOLE function that cannot be found. In my case, however, I notice that the debugger only underlines the FIRST LETTER of the function. So my question is, is the debugger, in this case, trying to indicate something specific via this behaviour and, if so, what?

Thanks in advance for any help here!!


#2

So some further investigation would indicate that it may be the case that when the function is not defined, the whole function is underlined whereas when the wrong argument types are provided to the function, according to the function definition, only the first letter of the function is underlined. Would be great if someone is willing to confirm or deny this behaviour though...


#3

I don’t have any insight about the meaning (or non-meaning) of just underlining the first letter, but to help in your searching the feature in question is called “Code Diagnostics”. Here’s the relevant support doc (thin on C++ details, unfortunately for this case):