Skip to content

Redesign [debug] directive for end user opt-in #1607

Open
@jonsequitur

Description

@jonsequitur

The [debug] directive allowed for a consistent way to attach a debugger and stop on a breakpoint in an application's startup code. We weren't satisfied with the security of the design. Ideally, this functionality should be opt-in by the end user rather than determined by the application developer.

One proposal is to have the debug check verify the presence of a different user-installed tool before pausing to attach the debugger.

Activity

drewburlingame

drewburlingame commented on Feb 20, 2022

@drewburlingame

I had implemented a similar directive in CommandDotNet but found that I often wanted the debugger to run before the app was configured so I could validate the configuration, especially when running middleware. So I created this static method that can be called before configuring the application. It doesn't address the security issue but I've found it more useful.

skrysmanski

skrysmanski commented on Mar 26, 2022

@skrysmanski

@jonsequitur

We weren't satisfied with the security of the design.

Could elaborate a little bit on what you mean by this exactly? :)

jonsequitur

jonsequitur commented on Mar 26, 2022

@jonsequitur
ContributorAuthor

As implemented, the [debug] directive presented a way to cause a tool using it to hang indefinitely while it waits for user input.

KalleOlaviNiemitalo

KalleOlaviNiemitalo commented on Jun 17, 2022

@KalleOlaviNiemitalo

Should the documentation of [debug] be commented out until the feature is restored?

jonsequitur

jonsequitur commented on Jun 17, 2022

@jonsequitur
ContributorAuthor

Apologies. The docs in this repo are outdated and need to be removed. The official documentation is here and doesn't mention [debug].

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @drewburlingame@jonsequitur@skrysmanski@KalleOlaviNiemitalo

        Issue actions

          Redesign `[debug]` directive for end user opt-in · Issue #1607 · dotnet/command-line-api