Yes, you can profile debug builds (even though it might not be recommended in terms of performance analysis).
- Can you let us know which exact driver version you are using?
- Did you allow access to performance counters in the Nvidia Control Panel Developer Settings, as described here https://developer.nvidia.com/nvidia-development-tools-solutions-err_nvgpuctrperm-permission-issue-performance-counters ? If not, this would be expected to show a different error, but it might help to narrow down the issue anyways.
- Is this for Nsight Compute 2021.1.0.0, or another version of the tool?