From 66f3cea3f75ca87d55521b36b2cb0e32607693f0 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 27 May 2026 09:30:45 -0700 Subject: [PATCH 1/4] Merge pull request #1570 from microsoft/dev/waan/fixLciLock Add UsrLk=true to new schema lci --- loc/lci/OpenFolderSchema.json.lci | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/loc/lci/OpenFolderSchema.json.lci b/loc/lci/OpenFolderSchema.json.lci index 10049e79b..25e6a02c5 100644 --- a/loc/lci/OpenFolderSchema.json.lci +++ b/loc/lci/OpenFolderSchema.json.lci @@ -398,7 +398,7 @@ - + @@ -416,7 +416,7 @@ - + @@ -434,7 +434,7 @@ - + From 5d40d571d567499b9a73e4c6b4a660b81b6cda15 Mon Sep 17 00:00:00 2001 From: lugerard <64075570+lugerard@users.noreply.github.com> Date: Wed, 27 May 2026 19:51:29 +0200 Subject: [PATCH 2/4] Natvis: trim leading/trailing whitespace from DisplayString XML text (#1571) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Visual Studio trims whitespace from DisplayString inner XML text before processing. MIEngine did not, causing multi-line DisplayStrings to render as blank on GDB/LLDB — the leading newline and indentation made the display appear empty in the variables panel. Fix: call format.Trim() at the top of FormatValue() before processing. --- src/MIDebugEngine/Natvis.Impl/Natvis.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MIDebugEngine/Natvis.Impl/Natvis.cs b/src/MIDebugEngine/Natvis.Impl/Natvis.cs index edf7f702a..fdd8a8001 100755 --- a/src/MIDebugEngine/Natvis.Impl/Natvis.cs +++ b/src/MIDebugEngine/Natvis.Impl/Natvis.cs @@ -1264,6 +1264,7 @@ private string FormatValue(string format, IVariableInformation variable, IDictio { return String.Empty; } + format = format.Trim(); StringBuilder value = new StringBuilder(); for (int i = 0; i < format.Length; ++i) { From d7a85367c6855e50e1b325b751b5b4790f815044 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 27 May 2026 12:41:31 -0700 Subject: [PATCH 3/4] Set networkIsolationPolicy on release pipelines (#1572) Apply remaining changes Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- eng/pipelines/DebuggerTesting-release.yml | 2 ++ eng/pipelines/VS-release.yml | 2 ++ eng/pipelines/VSCode-release.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/eng/pipelines/DebuggerTesting-release.yml b/eng/pipelines/DebuggerTesting-release.yml index d977b5280..a1375768a 100644 --- a/eng/pipelines/DebuggerTesting-release.yml +++ b/eng/pipelines/DebuggerTesting-release.yml @@ -15,6 +15,8 @@ resources: extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: + settings: + networkIsolationPolicy: Permissive,CFSClean,CFSClean2,CFSClean3 pool: name: VSEngSS-MicroBuild2022-1ES os: windows diff --git a/eng/pipelines/VS-release.yml b/eng/pipelines/VS-release.yml index 2be862ff9..d3f9e49dd 100644 --- a/eng/pipelines/VS-release.yml +++ b/eng/pipelines/VS-release.yml @@ -17,6 +17,8 @@ resources: extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: + settings: + networkIsolationPolicy: Permissive,CFSClean,CFSClean2,CFSClean3 pool: name: VSEngSS-MicroBuild2022-1ES os: windows diff --git a/eng/pipelines/VSCode-release.yml b/eng/pipelines/VSCode-release.yml index 3a4318c6e..09c162783 100644 --- a/eng/pipelines/VSCode-release.yml +++ b/eng/pipelines/VSCode-release.yml @@ -17,6 +17,8 @@ resources: extends: template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate parameters: + settings: + networkIsolationPolicy: Permissive,CFSClean,CFSClean2,CFSClean3 pool: name: VSEngSS-MicroBuild2022-1ES os: windows From ddae857f735657dbf4e4cac0e5b38d1bbdb42d10 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Sat, 6 Jun 2026 11:47:04 -0700 Subject: [PATCH 4/4] Disable debuginfod by default (#1574) * Disable debuginfod by default Change the default for debuginfod from enabled to disabled based on feedback from partner teams. Users can still opt-in by explicitly setting "debuginfod": { "enabled": true } in their launch configuration. Additionally, send an explicit "set debuginfod enabled off" command to GDB when disabled, ensuring debuginfod is fully turned off regardless of GDB config files or system defaults. * Fix tests --- loc/lci/OpenFolderSchema.json.lci | 2 +- src/MICore/JsonLaunchOptions.cs | 2 +- src/MICore/LaunchOptions.cs | 6 +++--- src/MICore/LaunchOptions.xsd | 6 +++--- src/MICore/LaunchOptions.xsd.types.designer.cs | 12 ++++++------ src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs | 4 ++++ src/MIDebugPackage/OpenFolderSchema.json | 6 +++--- test/CppTests/Tests/DebuginfodTests.cs | 3 ++- 8 files changed, 23 insertions(+), 18 deletions(-) diff --git a/loc/lci/OpenFolderSchema.json.lci b/loc/lci/OpenFolderSchema.json.lci index 25e6a02c5..5db781f7e 100644 --- a/loc/lci/OpenFolderSchema.json.lci +++ b/loc/lci/OpenFolderSchema.json.lci @@ -408,7 +408,7 @@ - + diff --git a/src/MICore/JsonLaunchOptions.cs b/src/MICore/JsonLaunchOptions.cs index 6f872157e..f34021960 100644 --- a/src/MICore/JsonLaunchOptions.cs +++ b/src/MICore/JsonLaunchOptions.cs @@ -324,7 +324,7 @@ public enum UnknownBreakpointHandling public partial class DebuginfodSettings { /// - /// If true (default), GDB's debuginfod support is enabled. + /// If true, GDB's debuginfod support is enabled. Default is false. /// [JsonProperty("enabled")] public bool? Enabled { get; set; } diff --git a/src/MICore/LaunchOptions.cs b/src/MICore/LaunchOptions.cs index c53bc89d0..2a8594fe7 100644 --- a/src/MICore/LaunchOptions.cs +++ b/src/MICore/LaunchOptions.cs @@ -1224,10 +1224,10 @@ public UnknownBreakpointHandling UnknownBreakpointHandling } } - private bool _enableDebuginfod = true; + private bool _enableDebuginfod = false; /// - /// If true (default), GDB's debuginfod support is enabled. + /// If true, GDB's debuginfod support is enabled. Default is false. /// public bool EnableDebuginfod { @@ -1912,7 +1912,7 @@ protected void InitializeCommonOptions(Json.LaunchOptions.BaseOptions options) } this.UnknownBreakpointHandling = options.UnknownBreakpointHandling ?? UnknownBreakpointHandling.Throw; - this.EnableDebuginfod = options.Debuginfod?.Enabled ?? true; + this.EnableDebuginfod = options.Debuginfod?.Enabled ?? false; int debuginfodTimeout = options.Debuginfod?.Timeout ?? 30; this.DebuginfodTimeout = debuginfodTimeout >= 0 ? debuginfodTimeout : 30; } diff --git a/src/MICore/LaunchOptions.xsd b/src/MICore/LaunchOptions.xsd index 5449b012e..6f84e776c 100644 --- a/src/MICore/LaunchOptions.xsd +++ b/src/MICore/LaunchOptions.xsd @@ -207,11 +207,11 @@ - + - If true (default), GDB's debuginfod support is enabled, allowing automatic downloading of debug symbols. - Set to false to disable debuginfod, which can prevent GDB from hanging when debuginfod servers are unavailable. + If true, GDB's debuginfod support is enabled, allowing automatic downloading of debug symbols. + Set to true to enable debuginfod. Default is false. diff --git a/src/MICore/LaunchOptions.xsd.types.designer.cs b/src/MICore/LaunchOptions.xsd.types.designer.cs index ab1b8c954..b4d238504 100644 --- a/src/MICore/LaunchOptions.xsd.types.designer.cs +++ b/src/MICore/LaunchOptions.xsd.types.designer.cs @@ -101,7 +101,7 @@ public partial class AndroidLaunchOptions { /// [System.Xml.Serialization.XmlAttributeAttribute()] - [System.ComponentModel.DefaultValueAttribute(true)] + [System.ComponentModel.DefaultValueAttribute(false)] public bool EnableDebuginfod; /// @@ -115,7 +115,7 @@ public AndroidLaunchOptions() { this.JVMPort = 65534; this.JVMHost = "localhost"; this.WaitDynamicLibLoad = true; - this.EnableDebuginfod = true; + this.EnableDebuginfod = false; this.DebuginfodTimeout = 30; } } @@ -468,7 +468,7 @@ public partial class BaseLaunchOptions { /// [System.Xml.Serialization.XmlAttributeAttribute()] - [System.ComponentModel.DefaultValueAttribute(true)] + [System.ComponentModel.DefaultValueAttribute(false)] public bool EnableDebuginfod; /// @@ -478,7 +478,7 @@ public partial class BaseLaunchOptions { public BaseLaunchOptions() { this.WaitDynamicLibLoad = true; - this.EnableDebuginfod = true; + this.EnableDebuginfod = false; this.DebuginfodTimeout = 30; } } @@ -562,7 +562,7 @@ public partial class IOSLaunchOptions { /// [System.Xml.Serialization.XmlAttributeAttribute()] - [System.ComponentModel.DefaultValueAttribute(true)] + [System.ComponentModel.DefaultValueAttribute(false)] public bool EnableDebuginfod; /// @@ -572,7 +572,7 @@ public partial class IOSLaunchOptions { public IOSLaunchOptions() { this.WaitDynamicLibLoad = true; - this.EnableDebuginfod = true; + this.EnableDebuginfod = false; this.DebuginfodTimeout = 30; } } diff --git a/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs b/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs index b5e8d1bd3..804709bc2 100755 --- a/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs +++ b/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs @@ -628,6 +628,10 @@ private async Task> GetInitializeCommands() { commands.Add(new LaunchCommand("set debuginfod enabled on", ignoreFailures: true)); } + else + { + commands.Add(new LaunchCommand("set debuginfod enabled off", ignoreFailures: true)); + } } // When user specifies loading directives then the debugger cannot auto load symbols, the MIEngine must intervene at each solib-load event and make a determination diff --git a/src/MIDebugPackage/OpenFolderSchema.json b/src/MIDebugPackage/OpenFolderSchema.json index 0039be008..379da0db3 100644 --- a/src/MIDebugPackage/OpenFolderSchema.json +++ b/src/MIDebugPackage/OpenFolderSchema.json @@ -197,12 +197,12 @@ "debuginfod": { "type": "object", "description": "Controls GDB's debuginfod behavior for automatic downloading of debug symbols.", - "default": { "enabled": true, "timeout": 30 }, + "default": { "enabled": false, "timeout": 30 }, "properties": { "enabled": { "type": "boolean", - "description": "If true (default), GDB's debuginfod support is enabled. Set to false to disable debuginfod, which can prevent GDB from hanging when debuginfod servers are unavailable.", - "default": true + "description": "If true, GDB's debuginfod support is enabled. Set to true to enable debuginfod. Default is false.", + "default": false }, "timeout": { "type": "integer", diff --git a/test/CppTests/Tests/DebuginfodTests.cs b/test/CppTests/Tests/DebuginfodTests.cs index b14dae27b..176fc2a18 100644 --- a/test/CppTests/Tests/DebuginfodTests.cs +++ b/test/CppTests/Tests/DebuginfodTests.cs @@ -108,7 +108,8 @@ public void DebuginfodDisabledDoesNotHang(ITestSettings settings) { string logContent = File.ReadAllText(engineLogPath); this.Comment("Verifying debuginfod was NOT enabled in GDB"); - Assert.DoesNotContain("debuginfod enabled", logContent); + Assert.DoesNotContain("set debuginfod enabled on", logContent); + Assert.Contains("set debuginfod enabled off", logContent); } } finally