Skip to content

How to attach debugger #3382

Answered by augustoproiete
ptvbnk asked this question in Q&A
May 30, 2021 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

Hey @coder2213 thanks for the interest in improving #2443

There's a few different ways to do that... A simple one would be to:

  • Run the Cake script with the flag -debug e.g. dotnet cake -debug test.cake
    You should get a message similar to:
Attach debugger to process 12345 to continue...
  • Then, open the Cake solution in Visual Studio
  • Put the breakpoints in the places you want (in your case, probably somewhere in cake/src/Cake.Common/IO/FileCopier.cs)
  • Go to the menu Debug ➡️ Attach to Process, and find the process with the number indicated by running Cake as per above


Another alternative is to

  • Set the Cake project as the startup project

  • Update the properties of the Cake project to…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ptvbnk
Comment options

@augustoproiete
Comment options

@ptvbnk
Comment options

@augustoproiete
Comment options

@ptvbnk
Comment options

Answer selected by ptvbnk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants