dotnet / dotnet/msbuild

Spawning worker nodes/task host nodes should not flow diagnostic environment variables

Open
#13,538 0 comments 0 reactions 0 assignees View on GitHub
Area: Debuggability Area: TaskHost backlog needs-design triaged User Experience
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Summary

When a user sets `MSBUILDDEBUGONSTART` or similar env vars, those are used by the MSBuild entrypoint to raise debugger attach prompts. These are not cleared when spawning any other processes used for workers, task hosts, etc, though - and so the user gets _absolutely deluged_ with debugger attach notifications.

### Background and Motivation

By default we shouldn't flow debugger attach/monitoring flags to child processes - but we should still have a way to allow that to flow (for example when desiring to debug out of proc worker node communication, or debugging the behavior of an out-of-proc-taskhost-loaded Task).

### Proposed Feature

We should by default _not_ flow the debugonstart (and related) environment variables to any spawned child process.

We _should_ include a way to specify that you _do_ want to allow child processes nodes to prompt.

Ideally we'd be able to 'target' which kinds of processes attempt to wait for debugging:
* any out of proc worker node?
* a specific out of proc worker node by id?
* all out of proc task hosts?
* a specific out of proc task host by Task identity?

### Alternative Designs

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.