C# Exceptions Not Giving Line Numbers

后端 未结 5 1994
攒了一身酷
攒了一身酷 2020-12-03 09:55

I am using C# having come from a Java background - I have an exception but it does not tell me the line number - Just the method name.

Is that usual?? Is it down to

5条回答
  •  半阙折子戏
    2020-12-03 10:17

    Line numbers should be available when compiling in Debug as long as you keep the pdb files in the application directory.

    This will also work in Release if you enable PDB creation, as per Justin's answer.

    If you are interested, more information can be found at PDB Files (MSDN)

提交回复
热议问题