feat: Support program parameter in attach configurations (#14046)#14108
Conversation
|
@Subham-KRLX It looks like there are compile errors: src/Debugger/configurationProvider.ts(361,40): error TS2339: Property 'findProcessByProgramName' does not exist on type 'DebugConfigurationProvider'. |
Move 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
|
@sean-mcmanus We've resolved both compilation errors by moving the findProcessByProgramName method to the correct location inside the DebugConfigurationProvider class. The fix has been committed and pushed to the feature/attach-by-program-name branch. The TypeScript compilation errors are now resolved. |
|
@sean-mcmanus I just want to add that I am also really interested in this feature. It seems to have been sitting for over a month waiting for a review, so I'm bumping this in case people forgot. |
sean-mcmanus
left a comment
There was a problem hiding this comment.
Why are there Code Sample changes? Can you remove those? Aren't those changes in a separate PR already?
Why is there an MIEngine_Debug subproject added? Can that be removed?
|
@sean-mcmanus I have cleaned up the PR by reverting the unrelated Code Samples changes and removing the MIEngine_Debug subproject. The PR now only contains the relevant changes for supporting the program parameter in attach configurations. |
@Subham-KRLX I still see the Code Sample changes, not reverted. |
|
@sean-mcmanus I have thoroughly reverted all unrelated Code Samples changes by syncing with upstream/main and removed the MIEngine_Debug subproject. |
|
@Subham-KRLX I've started reviewing this. I think I can finish tomorrow. |
- 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
|
Sorry, I've been busy with other stuff. I'll try to get to this tomorrow. |
sean-mcmanus
left a comment
There was a problem hiding this comment.
Also, there are some linter errors: Trailing spaces not allowed
Per Sean's feedback, check for remote attach scenarios before calling findProcessByProgramName to avoid unnecessary function calls and potential errors for remote attach users.
sean-mcmanus
left a comment
There was a problem hiding this comment.
I think the "program" field is required for gdb/lldb attach debugging. Are you able to debug without the "program" field?
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.
|
@sean-mcmanus You are correct - restored |
|
@Subham-KRLX It seems good to me, but I'm not sure if anyone else on our team wanted to review it. I might be able to get into 1.31.0 for next Thursday. |
* Bump uuid from 8.3.2 to 14.0.0 in /.github/actions (#14402) Bumps [uuid](https://github.com/uuidjs/uuid) from 8.3.2 to 14.0.0. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](uuidjs/uuid@v8.3.2...v14.0.0) --- updated-dependencies: - dependency-name: uuid dependency-version: 14.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @xmldom/xmldom from 0.8.12 to 0.8.13 in /Extension (#14403) Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.12 to 0.8.13. - [Release notes](https://github.com/xmldom/xmldom/releases) - [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md) - [Commits](xmldom/xmldom@0.8.12...0.8.13) --- updated-dependencies: - dependency-name: "@xmldom/xmldom" dependency-version: 0.8.13 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sean McManus <[email protected]> * clang-analyazer (#14411) * Adding additional parse checking logic (#14407) Adding additional parse checking logic to determine if idle state has no pending calls and finished workspace parsing, file parsing, and intellisense updates. * Update changelog and version for 1.32.2. (#14415) * Add Native Strings (#14419) * address codeQL issues (#14425) * Database population unification (#14426) * Bump ip-address from 10.1.0 to 10.2.0 in /.github/actions (#14429) Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.1.0 to 10.2.0. - [Commits](https://github.com/beaugunderson/ip-address/commits) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 1.15.0 to 1.16.0 in /.github/actions (#14431) Bumps [axios](https://github.com/axios/axios) from 1.15.0 to 1.16.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.15.0...v1.16.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.16.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add telemetry for run without debugging (#14428) * Allow for scheduling CI on any branch on demand (#14433) * Bump fast-xml-builder from 1.1.4 to 1.1.9 in /.github/actions (#14436) Bumps [fast-xml-builder](https://github.com/NaturalIntelligence/fast-xml-builder) from 1.1.4 to 1.1.9. - [Changelog](https://github.com/NaturalIntelligence/fast-xml-builder/blob/main/CHANGELOG.md) - [Commits](NaturalIntelligence/fast-xml-builder@v1.1.4...1.1.9) --- updated-dependencies: - dependency-name: fast-xml-builder dependency-version: 1.1.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump fast-uri from 3.1.0 to 3.1.2 in /Themes (#14437) Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to 3.1.2. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.0...v3.1.2) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump fast-uri from 3.1.0 to 3.1.2 in /ExtensionPack (#14438) Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to 3.1.2. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.0...v3.1.2) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sean McManus <[email protected]> * Bump fast-uri from 3.1.0 to 3.1.2 in /Extension (#14439) Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to 3.1.2. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.0...v3.1.2) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update postcss. (#14444) * Update fast-xml-parser. (#14445) * add strings to localize (#14448) * cpptools-srv2 crash handler. (#14449) * cpptools-srv2 crash handler. * Bump uuid and @azure/identity in /ExtensionPack (#14468) Removes [uuid](https://github.com/uuidjs/uuid). It's no longer used after updating ancestor dependency [@azure/identity](https://github.com/Azure/azure-sdk-for-js). These dependencies need to be updated together. Removes `uuid` Updates `@azure/identity` from 4.13.0 to 4.13.1 - [Release notes](https://github.com/Azure/azure-sdk-for-js/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Changelog-for-next-generation.md) - [Commits](https://github.com/Azure/azure-sdk-for-js/compare/@azure/identity_4.13.0...@azure/identity_4.13.1) --- updated-dependencies: - dependency-name: uuid dependency-version: dependency-type: indirect - dependency-name: "@azure/identity" dependency-version: 4.13.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @nevware21/ts-utils from 0.13.0 to 0.14.0 in /Extension (#14469) Bumps [@nevware21/ts-utils](https://github.com/nevware21/ts-utils) from 0.13.0 to 0.14.0. - [Release notes](https://github.com/nevware21/ts-utils/releases) - [Changelog](https://github.com/nevware21/ts-utils/blob/main/CHANGELOG.md) - [Commits](nevware21/ts-utils@0.13.0...0.14.0) --- updated-dependencies: - dependency-name: "@nevware21/ts-utils" dependency-version: 0.14.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update localization (#14461) * Localization - Translated Strings --------- Co-authored-by: csigs <[email protected]> * Reset status UI if DB fails to open (#14475) * Add "important" doxygen.sectionTags. (#14473) * Add "important" to doxygen.sectionTags. * Add debuginfod launch option to cppdbg debugger schema (#14471) Add the `debuginfod` configuration option to both launch and attach configurations for the cppdbg debugger type. This exposes the MIEngine debuginfod settings (enabled/timeout) so users can control GDB's debuginfod behavior and prevent hangs when debuginfod servers are unreachable. * Bump uuid and @azure/identity in /Themes (#14476) Removes [uuid](https://github.com/uuidjs/uuid). It's no longer used after updating ancestor dependency [@azure/identity](https://github.com/Azure/azure-sdk-for-js). These dependencies need to be updated together. Removes `uuid` Updates `@azure/identity` from 4.13.0 to 4.13.1 - [Release notes](https://github.com/Azure/azure-sdk-for-js/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Changelog-for-next-generation.md) - [Commits](https://github.com/Azure/azure-sdk-for-js/compare/@azure/identity_4.13.0...@azure/identity_4.13.1) --- updated-dependencies: - dependency-name: uuid dependency-version: dependency-type: indirect - dependency-name: "@azure/identity" dependency-version: 4.13.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sean McManus <[email protected]> * Bump qs from 6.15.0 to 6.15.2 in /Themes (#14477) Bumps [qs](https://github.com/ljharb/qs) from 6.15.0 to 6.15.2. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.15.0...v6.15.2) --- updated-dependencies: - dependency-name: qs dependency-version: 6.15.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sean McManus <[email protected]> * Update localization (#14484) * Localization - Translated Strings * Update localization. --------- Co-authored-by: csigs <[email protected]> * Bump tmp from 0.2.5 to 0.2.6 in /Extension (#14488) Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.6. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](raszi/node-tmp@v0.2.5...v0.2.6) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.6 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump qs from 6.15.0 to 6.15.2 in /Extension (#14489) Bumps [qs](https://github.com/ljharb/qs) from 6.15.0 to 6.15.2. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.15.0...v6.15.2) --- updated-dependencies: - dependency-name: qs dependency-version: 6.15.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump qs from 6.15.0 to 6.15.2 in /ExtensionPack (#14490) Bumps [qs](https://github.com/ljharb/qs) from 6.15.0 to 6.15.2. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.15.0...v6.15.2) --- updated-dependencies: - dependency-name: qs dependency-version: 6.15.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tmp from 0.2.5 to 0.2.7 in /ExtensionPack (#14492) Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](raszi/node-tmp@v0.2.5...v0.2.7) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tmp from 0.2.5 to 0.2.7 in /Themes (#14493) Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](raszi/node-tmp@v0.2.5...v0.2.7) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Remove compiler argument translation JSON files (#14467) * Update uuid and vsce. (#14495) * Update vsce. * Update uuid. * Update brace-expansion. (#14494) * Add a progress indicator with cancel for Switch Header/Source. (#14386) * Add a progress indicator with Cancel for Switch Header/Source. * Remove always-auth. (#13377) * Remove always-auth. * Update minimum VS Code version to 1.77 and vscode-languageclient to 9.0.1 (#14502) * Update minimum VS Code version to 1.77 since Windows 7 and 8 support was dropped. * Update vscode-languageclient. * Set debuginfod.enable to false (#14506) * Bump shell-quote from 1.8.2 to 1.8.4 in /Extension (#14507) Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.2 to 1.8.4. - [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md) - [Commits](ljharb/shell-quote@v1.8.2...v1.8.4) --- updated-dependencies: - dependency-name: shell-quote dependency-version: 1.8.4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump tmp from 0.2.6 to 0.2.7 in /Extension (#14512) Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.6 to 0.2.7. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](raszi/node-tmp@v0.2.6...v0.2.7) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.7 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump js-yaml from 4.1.1 to 4.2.0 in /Extension (#14514) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/commits) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump form-data from 4.0.5 to 4.0.6 in /Extension (#14513) Bumps [form-data](https://github.com/form-data/form-data) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md) - [Commits](form-data/form-data@v4.0.5...v4.0.6) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sean McManus <[email protected]> * Minor IntelliSense loc changes. (#14518) * Add plugin-specific login and EULA messages (#14519) These messages will be used by the plugin mode of the standalone language server. * Bump markdown-it from 14.1.1 to 14.2.0 in /Extension (#14522) Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.1.1 to 14.2.0. - [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md) - [Commits](markdown-it/markdown-it@14.1.1...14.2.0) --- updated-dependencies: - dependency-name: markdown-it dependency-version: 14.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump form-data from 4.0.5 to 4.0.6 in /Themes (#14527) Bumps [form-data](https://github.com/form-data/form-data) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md) - [Commits](form-data/form-data@v4.0.5...v4.0.6) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump undici from 7.24.0 to 7.28.0 in /Themes (#14528) Bumps [undici](https://github.com/nodejs/undici) from 7.24.0 to 7.28.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.24.0...v7.28.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.28.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump js-yaml from 4.1.1 to 4.2.0 in /Themes (#14529) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/commits) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump form-data from 4.0.5 to 4.0.6 in /ExtensionPack (#14530) Bumps [form-data](https://github.com/form-data/form-data) from 4.0.5 to 4.0.6. - [Release notes](https://github.com/form-data/form-data/releases) - [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md) - [Commits](form-data/form-data@v4.0.5...v4.0.6) --- updated-dependencies: - dependency-name: form-data dependency-version: 4.0.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * get OptionsSchema.json back in sync with package.json (#14523) * Cleanup from #13654 * Update OptionsSchema for #14108 * Update dependencies. (#14532) * Update github actions dependencies. (#14531) * Lock debuginfod strings. (#14520) * Allow suppression of run without debugging warnings (#14516) Added a property to disable the warning message generated when a launch config cannot be run directly in the terminal. * Update changelog and TPN for 1.33.0. (#14533) * Update changelog and TPN for 1.33.0. * Substitute `${env:X}` with an empty string for unset environment variables (#14535) * Expand undefined environment variables to empty * Use unique env var name Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Marked optional capturing groups as potentially undefined --------- Co-authored-by: Copilot Autofix powered by AI <[email protected]> * Update changelog again. (#14536) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sergio Ramirez II <[email protected]> Co-authored-by: Glen Chung <[email protected]> Co-authored-by: Bob Brown <[email protected]> Co-authored-by: Colen Garoutte-Carson <[email protected]> Co-authored-by: Luca <[email protected]> Co-authored-by: csigs <[email protected]> Co-authored-by: Andrew Wang <[email protected]> Co-authored-by: Ben McMorran <[email protected]> Co-authored-by: notable-equivalent <[email protected]> Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Fixes #14046
Add support for program parameter in attach configurations to attach to processes by executable name, similar to LLDB extension.
Example:
json
{
"type": "cppvsdbg",
"request": "attach",
"program": "myprogram.exe"
}
Automatically finds matching process, prompts if multiple matches. Backward compatible with existing processId configurations.