feat: Support program parameter in attach configurations (#14046) by Subham-KRLX · Pull Request #14108 · microsoft/vscode-cpptools
and others added 3 commits
August 2, 2025 07:37Move the findProcessByProgramName private method from ConfigurationSnippetProvider class to DebugConfigurationProvider class where it belongs and is called. This fixes: - TS2339: Property 'findProcessByProgramName' does not exist on type 'DebugConfigurationProvider' - TS6133: 'findProcessByProgramName' is declared but its value is never read
- Move remote attach check to beginning (silent fallback) - Validate program path before processing - Make case-sensitive matching OS-specific (Windows only) - Remove startsWith matching (exact match only) - Optimize targetName outside lambda with .exe suffix on Windows - Remove all logging statements - Fall back to process picker instead of showing errors - Fix grammar in comments (add 'the' articles) - Update descriptions in package.nls.json for clarity
Per Sean's feedback, check for remote attach scenarios before calling findProcessByProgramName to avoid unnecessary function calls and potential errors for remote attach users.
MIEngine requires the program field for gdb/lldb debugging even in attach mode. Without it, debugging fails after the debugger starts. The program field serves dual purpose: finding the process by name (new feature) and providing symbol information to the debugger (existing MIEngine requirement). Updated documentation to clarify that program is required and explain why.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters