None of the RStudio's menu items on Debug/On Error catches my error

I inserted this code

xx <- zzz

in function that my code calls. The function is in a different file from the function that calls it. If I run the program I get an error message:

Error in create.stock.dataframe(df_stocks, df_risk_free_data, stock_index,  : 
  object 'zzz' not found

I tried setting Debug/On Error to each of the three alternatives, Message Only, Error Inspector, and Break In Code, and the behavior is always the same, as above.

What am I doing wrong? This may be related to the fact that I am not seeing the two lines on the screen that let me choose to look at the stack when there is an error.

Go to Tools -> Global Options -> Advanced -> Debugging, and uncheck "Use debug error handler only when my code contains errors", then restart.

Does that make it do what you want?

Hi Jonathan, that made it do exactly what I wanted. Many thanks.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.