If I choose release mode to build a dll, is the stacktrace information still available?
If so, then what information is unavailable in release mode?
If I choose release mode to build a dll, is the stacktrace information still available?
If so, then what information is unavailable in release mode?
If you are referring to stack traces in the context of Exceptions, then yes, stack trace information is still available in release mode. What you lose in release mode is full debug symbols, which provide source code sequence point information to stack traces. This allows the stack trace to identify the specific line of code that a particular stack trace entry refers to.
Additionally, in release mode with optimizations enabled, code may be inlined, changing how the runtime code is structured. While definitely more optimal, runtime release code has less of a relationship with the line of code that were actually written.
You always have stack trace information--that's a runtime feature unrelated to the build mode--but line numbers and source file names are normally unavailable in release build stack traces.
You can get both line numbers and source file names in release build stack traces (including in exceptions) by altering the build configuration to create full program database (.pdb) files. To do so in Visual Studio:
Note that this will only help if the .pdb files are deployed alongside your application.