Skip to content

Add --debug-attach option to MTP#6499

Merged
Evangelink merged 2 commits intomainfrom
dev/amauryleve/debug-attach
Sep 3, 2025
Merged

Add --debug-attach option to MTP#6499
Evangelink merged 2 commits intomainfrom
dev/amauryleve/debug-attach

Conversation

@Evangelink
Copy link
Copy Markdown
Member

Fixes #5531

I went with --debug-attach as it seems more natural and closer to reality than --debug to me. This is also aligned with naming on sdk --debug: attach

Another option would be to use --debug attach so we could add more debug modes in the future.

@Evangelink Evangelink enabled auto-merge (squash) September 3, 2025 08:15
@Evangelink Evangelink merged commit 8cfa946 into main Sep 3, 2025
8 checks passed
@Evangelink Evangelink deleted the dev/amauryleve/debug-attach branch September 3, 2025 12:17
@nohwnd
Copy link
Copy Markdown
Member

nohwnd commented Sep 3, 2025

Would you reconsider the name to be --debug? That is what dotnet sdk uses, even though they just emit it in debug builds.

https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/Extensions/ParseResultExtensions.cs#L232-L239

--debug:attach is used just by templating engine.

Also the I've grown to like the implementation on msbuild that does readline, and unblocks even if there is no debugger. Makes it nicer when you run with the parameter / env variable by accident and just want to continue.

On the other hand, it is annoying to have to press the key to unblock, so imho awaiting the debugger or keypress would be the best.

https://github.com/dotnet/msbuild/blob/53a2d6ba9edc932e724dc80a5a56eeb9943863cf/src/MSBuild/XMake.cs#L589-L605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --debug parameter

3 participants