- Home /
Unity hides filename in stacktrace
Unity 2020.3.5f1 - target Windows - Mono - Devloppement build
I have difficulties debugging my scripts because the stacktraces Unity is giving me in the console have a hash instead of the filename of the script and the line number is always 0, like this:
NullReferenceException: Object reference not set to an instance of an object CrystalActivationRedFalling.OnDestroy () (at <9901ea6627f647f487ca7e615fc10f7d>:0)
Also when trying to attach Unity Debugger (VScode) to unity everything goes fine but the breakpoints are never triggered.
it'shash instead of the filename (...)
CrystalActivationRedFalling.cs
To see a line number you need a valid
.pdb
file.
it's
CrystalActivationRedFalling.cs
Yes I know that. I've put it for illustrative purposes, so that you can see that the filename is shown as 9901ea6627f647f487ca7e615fc10f7d
instead of the real name. And I still don't have the line number of the exception.
And how do I do to make Unity generate a valid .pdb
for my scripts? (those are run of the mill monobehaviors saved in the assets folder, no fancy packages/librairies or whatnot)
Edit: Here are my settings:
When you target Windows
there is a Copy PDB Files
field, enable that. PDB file contains debug data you need here.
Your answer

Follow this Question
Related Questions
what should I do whit this script to work? 2 Answers
TiltShift post effect generates compile error 0 Answers
Script only works onetime 0 Answers
Car NOS script not working 2 Answers