From @ali-raza-iftikhar on https://github.com/prafullbhosale/EmptyControllerAndViewScaffolder/issues/1
What is the way to debug scaffolding?
@ali-raza-iftikhar, the below steps are what I use for debugging.
Let me know if you hit any issues with this.
while (!System.Diagnostics.Debugger.IsAttached){ }
dotnet.exe (there maybe multiple, but ususally this is the one on top of the list).Some common issues when debugging doesnāt hit the breakpoint:
dotnet.exe process to which we attach isnāt correctI will try. but thanks in advance for writing detailed explanation. will let you know if any issue occurred.
Brother it worked. Today tested it. Lot of thanks. You have helped me from scratch of understanding and writing scaffolding till debugging. It all worked :-) your help is appreciated. š
I have just one issue. Which i don't think belongs to you/scaffolding. But hopefully you can help me for that. I am trying to create scaffolding package from VS2017 pack. I want template folder to be included as well. How i can achieve that?
Even if you can't help me for this, i am still thankful to you for your help. :-)
I want template folder to be included as well. How i can achieve that?
You would need to specify the files to be included as part of the package in the csproj file.
Take a look at https://github.com/aspnet/Scaffolding/blob/dev/src/Microsoft.VisualStudio.Web.CodeGenerators.Mvc/Microsoft.VisualStudio.Web.CodeGenerators.Mvc.csproj#L13-L15
Awesome thanks brother š
Closing this.
Most helpful comment
@ali-raza-iftikhar, the below steps are what I use for debugging.
Let me know if you hit any issues with this.
Steps for debugging
a. Add a new NuGet.config file to point to the artifacts\build folder under the repo directory.
b. Update the version numbers for the scaffolding packages in the project to pick up latest.
dotnet.exe(there maybe multiple, but ususally this is the one on top of the list).a. Need to figure out if the code is in inside man or the CLI tool and attach accordingly.
b. If project is targeting full framework and the break point is in the inside man code, the process name is dotnet-aspnet-codegenerator-design.exe
Some common issues when debugging doesnāt hit the breakpoint:
dotnet.exeprocess to which we attach isnāt correct