Skip to content

FocusProcess checkbox is hidden. #2265

Open

Description

@akeit0

It is invisible because of the same Grid.Row value as Command.

<TextBlock Grid.Row="1" Grid.Column="0" x:Name="CommandToRunLabel" Margin="5,0" VerticalAlignment="Center" ToolTip="The command line of the process to run while collecting data.">
<Hyperlink Command="Help" CommandParameter="CommandToRunTextBox">Command:</Hyperlink>
</TextBlock>
<controls:HistoryComboBox Grid.Row="1" Margin="0,5,0,0" Grid.Column="1" x:Name="CommandToRunTextBox" VerticalAlignment="Center" KeyDown="CommandToRunKeyDown" AutomationProperties.Name="Command to run" />
<!-- FocusProcess section for Collect command-->
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
<TextBlock Name="FocusProcessLabel" Margin="5,0" VerticalAlignment="Center" ToolTip="Name or PID of the process to collect user-mode events for.">
<Hyperlink Command="Help" CommandParameter="FocusProcessTextBox">Focus process:</Hyperlink>
</TextBlock>
<CheckBox Name="FocusProcessCheckBox" VerticalAlignment="Center" Margin="1,2,2,0" Click="FocusProcessCheckBoxClicked" IsChecked="false" AutomationProperties.Name="Focus process" />
</StackPanel>
<TextBox Grid.Row="1" Margin="0,5,0,0" Grid.Column="1" x:Name="FocusProcessTextBox" VerticalAlignment="Center" />

Image

Activity

  1. brianrob commented on Jul 16, 2025

    @brianrob
    Member

    Looking at this, it appears this was by design. The focus process capability is not exposed in the UI if you are using the Run command. I suspect the reason for this is that we don't know the name or PID of the process until after tracing has started. If we wanted to try and fix this, we'd need to make some educated guesses on what the name of the process is before we start it, so taht we can tell ETW ahead of time.

    Is this something that you're interested in implementing?

  2. akeit0 commented on Jul 16, 2025

    @akeit0
    Author

    Thank you for your reply!
    I wanted to focus on processes run from command, so for now I was able to achieve what I wanted to do by running from command line and Start collection in perfview, but I still wanted to run command from perfview.
    I would like to have the ability to run from perfview, wait until the target named process is recognized, and then collect.

    I will see if I can implement this....

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions