Turn on Debug Mode

I am using VS Community 2019 and have both turned on debug mode and attached the debugger by clicking ‘Attach to Unity’ in VS.
But for some reason, greyed out private variables are not showing in the inspector.
Any fix?

I’M a bit confused what this question is about because VisualStudio and attaching it as a runtime debugger has nothing to do with the inspector or the debug mode of the inspector. So what exactly do you want to achieve, what have you done in order to reach that goal and what does not work as you expect?

If you want to enable the debug view mode in the inspector you just have to click the cogwheel at the top right of the inspector window and select debug mode from the drop down menu. Don’t forget to switch the mode back once you’re done because when the inspector is in debug mode none of the custom editors or property drawers are executed, not even the built-in ones. You really should only use the debug view of the inspector for concrete debugging.

If it’s not about the inspector but about VisualStudio you should edit your question and provide more details.