Active Oldest Votes. Ajay Jon Skeet Jon Skeet 1. Jon Does it help provide extra information to the user if the application crashes in use?
Bear in mind that you should probably keep these included in your debug releases, as it allows exceptions to be traced to a specific line in your code. Without the symbols in the pdb file, you will find it hard to pinpoint specific problems in order to solve them. You don't necessarily need to exclude them from release builds either, as sometimes the extra information in a big report can be very useful. Jared: Yes, it includes a stack trace of the exception, which will pinpoint to a specific function and line of code.
Jared: What do you mean by "the JIT window"? It's unlikely to give much more information to the user, but it may let you attach a debugger to a release build if you need to. Typically you wouldn't include it for end-user applications though. Of course, just because it's copied to the Release folder doesn't mean you have to ship it in the installer Please separate the two in your mind - they're completely different file formats, for different purposes.
Including a PDB wouldn't introduce a problem particularly; it may make a hacker's job slightly easier, but is that a particular concern for you? In general,. NET can be decompiled relatively easily in most cases - if you're worried about that, simply not shipping the PDB isn't a good solution. Show 5 more comments. This is a very important part to keep in mind which the accepted answer here doesn't mention.
Mark Byers Mark Byers k gold badges silver badges bronze badges. Release mode still builds PDBs by default, I believe. You can change the project properties to disable it though. Yup; it still comes with release with a default project. I just checked and I also get one by default if using Visual Studio.
Somewhen in the last 11 years, that PDB link went stale. Here's the new link: wintellect. Nipuna Nipuna 5, 8 8 gold badges 59 59 silver badges 84 84 bronze badges. Allow source server for partial trust assemblies Managed only and Always run untrusted source server commands without prompting can increase the security risks. You can also set compiler options in code. To set the compiler options for your build configurations in Visual Studio, see Set debug and release configurations. The inserted information includes type information, but does not include symbol information, such as function definitions.
The linker also embeds the path to the. Symbols are available for any bit system DLL. The calls are listed in the calling order, with the current function the most deeply nested at the top.
Seeing exact function names is useful for setting a breakpoint on a function, because function names can be truncated elsewhere in the debugger.
Set the web. NET application to debug mode. Debug mode causes ASP. NET to generate symbols for dynamically generated files and enables the debugger to attach to the ASP. NET application. Visual Studio sets this automatically when you start to debug, if you created your project from the web projects template.
You can use the Modules , Call Stack , Locals , Autos , or any Watch window to load symbols or change symbol options while debugging. For more information, see Get more familiar with how the debugger attaches to your app. During debugging, the Modules window shows the code modules the debugger is treating as user code, or My Code, and their symbol loading status. You can also monitor symbol loading status, load symbols, and change symbol options in the Modules window.
There are several ways for the debugger to break into code that does not have symbol or source files available:. When this happens, the debugger displays the No Symbols Loaded or No Source Loaded pages to help you find and load the necessary symbols or source.
To use the No Symbols Loaded document page to help find and load missing symbols:. If the debugger finds the. Otherwise, it displays a No Source Loaded page that describes the issue, with links to actions that might resolve the issue. You can specify the locations the debugger searches for source files, and exclude specific files from the search.
Under Directories containing source code , type or select source code locations to search. Use the New Line icon to add more locations, the Up and Down arrow icons to reorder them, or the X icon to delete them. The debugger searches only the specified directory. You must add entries for any subdirectories that you want to search.
Under Do not look for these source files , type the names of source files to exclude from search. Understand symbol files and Visual Studio symbol settings.
NET remote symbol loading changes in Visual Studio and Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. When you load a module into the process address space, the debugger uses two pieces of information to find the matching PDB file. The first is obviously the name of the file.
If you load ZZZ. The extremely important part is how the debugger knows this is the exact matching PDB file for this binary. Since the act of compiling creates this GUID, stop and think about this for a moment.
This is why it is so critical to save your PDB files for every build. However, you can look at the GUID value in your binary. The Pietrek articles will explain the output, but the important piece to us is the Debug Directories output:. With the knowledge of how the debugger determines the correctly matching PDB file, I want to talk about where the debugger looks for the PDB files.
You can see all of this order loading yourself by looking at the Visual Studio Modules window, Symbol File column when debugging. The first place searched is the directory where the binary was loaded. If the PDB file is not there, the second place the debugger looks is the hard coded build directory embedded in the Debug Directories in the PE file. If the PDB file is not in the first two locations, and a Symbol Server is set up for the on the machine, the debugger looks in the Symbol Server cache directory.
This search order is why your local builds and public build parts never conflict. Where PDB file loading gets a little more interesting are those.
For private builds on your local machine, life is easy because the debugger will find the PDB file in the build directory as I described above. The pain starts when you need to debug or test a private build on another machine. While it is subject to change in the future, an assembly compiled for Any CPU is actually in a directory like the following:.
Example is the name of the assembly, 1.
0コメント