Repository navigation
Conversation
…l launch errors startup_project_set passed the display name straight to SolutionBuild.StartupProjects, which expects a UniqueName and silently ignored anything else, while startup_project_get returned that UniqueName. Both tools now resolve projects the same way project_list does: the display name is translated to a UniqueName before writing, the saved value is read back, and the read side translates it back to the display name. debugger_launch(projectName) never started the requested project. Its IVsDebuggableProjectCfg path resolves the project and its configuration correctly, but the configuration object of an SDK-style project does not implement IVsDebuggableProjectCfg, so the call always failed and reported the misleading "Use project_list to verify the project name". SDK-style projects therefore have to be launched through the solution's startup project. The command that starts a build or debug session returns before Visual Studio resolves the startup project, so a temporary swap cannot be undone without launching the wrong project. The tool now sets the requested project as the startup project and leaves it set; the tool descriptions and success messages say so. Failures return the real reason (unknown project, active debug session, startup project not applied, or the exception message) instead of a generic name hint.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Important
Behavior change: When
projectNameis supplied todebugger_launchordebugger_launch_without_debugging, the requested project becomes the solution’s startup project and remains so after launch. This replaces the previous behavior, which promised not to change the startup project. Calls withoutprojectNamestill launch the current startup project.Issue A and fix
startup_project_setwrote the display name straight intoSolutionBuild.StartupProjects, which only accepts aUniqueName. The tool ignored an unresolvable value without raising an error, so it reported success even though nothing changed.While the setter and the launch tools all take display names,
startup_project_getreturned the rawUniqueName.To address this, both tools now resolve projects the same way
project_listdoes: the setter accepts a display name or aUniqueName, writes theUniqueName, and reads the saved value back to confirm it was applied; the getter translates the savedUniqueNameback to the display name.Issue B and fix
debugger_launch(projectName)anddebugger_launch_without_debugging(projectName)never started the requested project either.They resolved the project and its configuration through
IVsDebuggableProjectCfg, which the configuration object of an SDK-style (Common Project System) project does not implement, so the call always failed and the tool reported "Use project_list to verify the project name" no matter what the real cause was.To address this, these tools now set the requested project as the startup project, leave it set, and say so in their descriptions and success messages. A failure now returns the actual reason instead of a name hint: no solution open, unknown project name, a debug session already running, the startup project not being applied, or the exception message.
Type of Change
fix- Bug fixRelated Issues
#49
Checklist
Screenshots (if applicable)
N/A
Additional Notes
Verified locally on Visual Studio 2026 against a solution containing more than one launchable project: the getter returns a display name, the setter accepts it (and rejects an unknown name), and the launch tools start the requested project, confirmed by the process path and by the startup project changing to it.