Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Visual Studios Debugging settings saved?

When I change the Debugging settings in the Project Properties (in my case especially the Environment value) it is not saved to the project or solution file.

VS Property Pages

Where is it saved?

like image 746
jaba Avatar asked Aug 15 '17 09:08

jaba


People also ask

How do I change debug config in Visual Studio?

In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).

Which file includes Visual Studio profiles for debug settings?

In Visual Studio, this is called a PDB file which is an abbreviation for program database. The amount of information contained in this PDB file depends on which build option you choose, Release or Debug.

Where is the Visual Studio debugger?

You can access the project-specific properties by right-clicking the project in Solution Explorer and selecting Properties. Debugging properties typically appear in the Build or Debug tab, depending on the particular project type. Starting in Visual Studio 2022, the Debug tab for .


2 Answers

If you are using the new SDK-style projects, debug settings are now stored in ./Properties/LaunchSettings.json. They are shared between all projects in the same folder.

like image 151
Artfunkel Avatar answered Sep 17 '22 08:09

Artfunkel


Thanks to the Stack Overflow question Should I add the Visual Studio .suo and .user files to source control I was able to solve the question with Chris Nielsens answer which I quote here:

You can open both the .user and the .csproj files in any text editor. I just tested copy-pasting the relevant debug settings from the .user into the .csproj, then deleting the .user file. Debugging continued to work, happily reading the correct settings from their new location in the .csproj file. This should provide a way to commit debug settings without committing the .user file. Be sure you put them in the right configuration (debug, release, etc.). Works on my machine! =)

I just copied:

    <LocalDebuggerEnvironment>PATH=$(CxPathd);%PATH%</LocalDebuggerEnvironment>
    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>

from the .user file to the .vcxproj file to the same section of the document:

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

In my case these where the only entries in the .user file so it would be okay in my case to check them into the SCM but it maybe cleaner to copy it to the .vcxproj file.

like image 43
jaba Avatar answered Sep 21 '22 08:09

jaba