14

I would like to step through, using debug() or trace(), a function that was not exported. For example, how can I do it for vcov.polr of the package MASS, which is called from the function polr. polr is exported, but vcov.polr is not.

That is, when I run polr, I would like the debug browser to start once the code enters vcov.polr.

Iterator
  • 20,250
  • 12
  • 75
  • 111
Xu Wang
  • 10,199
  • 6
  • 44
  • 78

1 Answers1

23

try

debug(MASS:::vcov.polr)

note that three colon ::: make the hidden object in a package visible.

kohske
  • 65,572
  • 8
  • 165
  • 155