No line numbers in stack trace

I’ve been using Unity for a while, and usually when an Exception is thrown and I click it in the console, it gives me line numbers for every part of the stack trace. Here is what is looks like now (part of it):

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[System.Collections.Generic.List`1[System.Boolean]].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
GameModeScreen.UpdateVariation ()
GameModeScreen.set_currVariation (Int32 value)
GameModeScreen.set_currMode (Int32 value)
GameModeScreen.HigherMode ()

At the end of the third line it gives me a line in some c# library (“…/List.cs:633”), it used to also print those line numbers for the scripts written by me. For example the last lines, it would usually print the corresponding line in the “GameModeScreen” script. Did I acidentally disable that?

So, typically this happens for one of two reasons:

1.) You built in release mode, so debug symbols weren’t generated. This is why built game logs don’t include line numbers. Unless you’re importing DLLs though, this is pretty unusual in the editor. So, it’s most likely…

2.) The compiler optimized your code in such a way that the line numbers are no longer correct, and it therefore leaves them off. This can happen for a number of reasons; using coroutines, certain loop types, and (most likely for you) putting major logic into a property getter/accessor.

So, in theory, instead of currMode { get; set; }, if you use SetCurrMode() and GetCurrMode(), you should get your line numbers back.