Debugging Panda3d on Mac Platform

I have Panda3d compiled on Mac OS 11 Big Sur and have my first bug to start working on. It’s in the C++ code and I have a possible solution. But before I start I want to step through the code and make sure I understand exactly what it’s doing. To do this I have to have a debug environment set up.

I am using Visual Studio Code and have been able to set up the debugging of simple programs. How do I now integrate VS Code into my routine and be able to call a routine in panda3d I want to examine and then get it to display in the debugger?

Specifically, I want to walk through int EggTextureCollection::find_used_textures and see how it works and look at the data structures.