Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: child process debugging support #43924

Open
gregg-miskelly opened this issue Oct 27, 2020 · 2 comments
Open

Suggestion: child process debugging support #43924

gregg-miskelly opened this issue Oct 27, 2020 · 2 comments
Labels
area-Diagnostics-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@gregg-miskelly
Copy link
Contributor

Description

Currently, there is no way for a debugger to automatically debug child .NET processes on all platforms. On Windows + Visual Studio, there is the Child Process Debugging Power Tool but we don't have an answer for non-Windows.

Proposal:

  1. Add a new ICorDebug API to allow a debugger to opt-into notification of when child processes are started. If enabled, the notification should fire when the new process exists, but before it can run any .NET Code.
  2. Modify implementation of System.Diagnostics.Process.Start (and other prominent places where the runtime starts processes, in case some stuff uses some other API) to make the following change to process starting when there is an attached debugging which has opted into the new notification
    • Start the new process suspended (ex: use CREATE_SUSPENDED on Windows, or the equivalent PAL functionality)
    • Fire the notification to the debugger
    • Resume the new process after the debugger continues execution
  3. The notification should contain the following information:
    • The new process id
    • The new application executable, or maybe the logical executable (ex: foo.dll instead of dotnet.exe)
    • Perhaps the command line of the new process
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Diagnostics-coreclr untriaged New issue has not been triaged by the area owner labels Oct 27, 2020
@ghost
Copy link

ghost commented Oct 27, 2020

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

@tommcdon tommcdon added enhancement Product code improvement that does NOT require public API changes/additions and removed untriaged New issue has not been triaged by the area owner labels Oct 29, 2020
@tommcdon tommcdon added this to the 6.0.0 milestone Oct 29, 2020
@tommcdon tommcdon modified the milestones: 6.0.0, Future Mar 12, 2021
@rohanrhu
Copy link

MS you are a trillion dollars company why does this very important missing feature stay here forever?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Diagnostics-coreclr enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

4 participants