Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Interactive debugging aid #1531

Closed
Closed

Description

@wjk

While in the process of debugging #1530, I find that attaching the Visual Studio debugger to ILC is an extremely annoying process. I have to edit ILC's Main() method, add some code that waits for a keypress, and then rebuild CoreRT. The pause for the keypress gives me time to switch back to Visual Studio and Attach to Process after I launch ILC from within PowerShell. However, once the debugging session is done, I have to remove the keypress code and rebuild CoreRT again, because otherwise ILC would crash when invoked from my automated build process. Is there/could there be an easier way to accomplish this? Thanks!

Activity

  1. wjk commented on Jul 16, 2016

    @wjk
    ContributorAuthor

    @jkotas I'm afraid not, as if I attach to the process before CoreCLR is initialized, the debugger is of no practical use. From what I gather from the linked post, this would initialize the Visual Studio debugger immediately when the process launches. Visual Studio would then auto-detect native code and attach the C++ debugger. By the time I detach ILC has run to completion before I can reattach using the C# debugger. If there is a way I can tell Visual Studio what debugger flavor to use, then it might work.

  2. jkotas commented on Jul 16, 2016

    @jkotas
    Member
  3. wjk commented on Jul 16, 2016

    @wjk
    ContributorAuthor

    @jkotas That would be perfect.

  4. jkotas commented on Jul 16, 2016

    @jkotas
    Member

    @wjk Are you interested in submitting PR with the fix?

    The command line option may be called --waitfordebugger so that it is clear what it does and not getting confused with generating debuggable code. A good place to add the implementation of the helper class may be src\Common\src\CommandLine. Thanks.

  5. wjk commented on Jul 16, 2016

    @wjk
    ContributorAuthor

    @jkotas Of course! I’ll get on it as soon as I can.

  6. jkotas commented on Jul 16, 2016

    @jkotas
    Member

    Fixed by #1532

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions