1

I just started coding with AspNetZero V8.0 solution. I purchased this version a couple of years ago. I had kept the raw downloaded solution in a GIT Repo without any changes. Recently I downloaded the code for use in my project. All I have done so far is setup connection string, setup a tenant and logged into a tenant. After I got all that working I started development for my first domain class "Country". I have setup the domain classes, interfaces, application service and EF migration. All of this worked without any issues.

Now I have setup app service for Country domain and I am trying to test it from chrome console, as per the AspNetZero docs here. When I test the service I'm getting an error in the console and an error is getting logged in the AuditLogs table too. So in order to identify my issue with app service, I decided to debug the code. This is where my problem exists.

I am able to start the debugger. I see the chrome browser window open up, I see VS2019 (v16.8.4) switch to debug layout. After about 30+ seconds the browser closes and VS2019 returns to normal mode, not in debug, layout. I do not get any errors logged in chrome console, windows event log or in VS2019 output. I have read many threads on SO about similar issues and tried many different VS2019 option changes, nothing seems to make a difference. I tried a couple of other solutions, AspNetZero and other .NET Core, in VS2019 and I am able to debug them normally. Has anyone else run into similar issue with AspNetZero solution or any other type of solution?

exlnt
  • 293
  • 3
  • 20

1 Answers1

0

This is because they run the YOURCOMPANY.Web.Host as .exe OutputType.

To run and debug the project, open CMD on the YOURCOMPANY.Web.Host location then execute dotnet run

After that:

Attach to a running process on your local machine

  1. In Visual Studio, select Debug > Attach to Process (or press Ctrl+Alt+P) to open the Attach to Process dialog box.
  2. Check the Connection type. In most scenarios, you can use Default. Some scenarios may require a different connection type. For more info, see other sections in this article or Common debugging scenarios.
  3. Set the Connection target your local machine name.

enter image description here

  1. Finally, attach.

For more information: Attach to running processes with the Visual Studio debugger

Mehdi Daustany
  • 1,018
  • 4
  • 10
  • 23