Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include debugging symbols to .vsix package

I have written visual studio extension for private use. The package is still under development but I would like to use it and distribute it to my colleagues. Is it possible to include debugging symbols (.pdb) to .vsix package? I prefer a Visual Studio or Project setting to the package editing.

like image 309
IvanH Avatar asked Sep 25 '13 14:09

IvanH


People also ask

Where to place pdb files for debugging?

The easiest way to use the PDB file is to let Visual Studio do the heavy lifting - either launch your program with Visual Studio's "Debug" command (F5 by default), or run the program and use the "Attach to Process" item in Visual Studio's Debug menu.

What is the use of PDB file in c#?

pdb file holds debugging and project state information that allows incremental linking of a Debug configuration of your app. The Visual Studio debugger uses . pdb files to determine two key pieces of information while debugging: The source file name and line number to display in the Visual Studio IDE.

What is pdb files in. net?

A PDB file is an auxiliary file produced by a compiler to provide other tools, especially debuggers, information about what is in the main executable file and how it was produced. For example, a debugger reads a PDB to map foo. cs line 12 to the right executable location so that it can set a breakpoint.


1 Answers

There's no setting for it within the VS UI, but you can edit your .csproj or .vbproj file to change it. If you open the .csproj file in notepad, either update or add this under a <PropertyGroup>

<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>

You probably want to add this under your "debug" PropertyGroup so that way it gets included in debug builds but not release ones you might stick somewhere public. If you have project references that get added to the VSIX, go to the <ProjectReference> node in your project file and look for:

<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3b</IncludeOutputGroupsInVSIX>
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>

The first line is the output groups that get included in the VSIX, and the second is what gets copied locally when you hit F5. Tweak the groups as expected, where the %3b is the escaped form of a ; and is the delimiter here.

like image 96
Jason Malinowski Avatar answered Sep 20 '22 04:09

Jason Malinowski