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.