What does "Generate Debug Info" mean in VB/C#?
The difference between "none" and "pdb-only" only is pretty clear. But what about "pdb-only" and "full"?
Debug information is a collection of information that is generated by the C/C++ compiler or assembler program that describes the application for a debugger to use. BAL shared objects (BSOs) and C/C++ shared objects (CSOs) are in executable and linkable format (ELF) object files.
In the Visual Studio context, when you debug your app, it usually means that you are running the application with the debugger attached (that is, in debugger mode). When you do this, the debugger provides many ways to see what your code is doing while it runs.
The Visual Studio debugger helps you observe the run-time behavior of your program and find problems.
To create a run/debug configuration for an item in your project, follow these steps: Open a project in Android or Project view. In the Project window, right-click a testable item and select either Run filename or Debug filename . Android Studio creates a temporary run/debug configuration and launches your app.
The compiler will generate a pdb file for you when you build which contains the symbols for your application and can be used by the Visual Studio debugger and external debuggers to find where something went wrong easily.
"Full" means that full debugging information will be generated when you build your application, so the code itself will be debuggable which includes the [DebuggableAttribute]
which links the code to the debugging information, e.g. symbols.
"pdb-only" means that only the pdb debugging information will be generated on build, which will not add the [DebuggableAttribute]
to the compiled code which is used by the JIT compiler to link the code the debugging information.
More info can be found here
From Should I compile release builds with debug info as "full" or "pdb-only"?
Also see https://docs.microsoft.com/en-us/cpp/build/reference/debug-generate-debug-info
I would build with pdb-only. You will not be able to attach a debugger to the released product, but if you get a crash dump, you can use Visual Studio or WinDBG to examine the stack traces and memory dumps at the time of the crash.
If you go with full rather than pdb-only, you'll get the same benefits, except that the executable can be attached directly to a debugger. You'll need to determine if this is reasonable given your product & customers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With