02-04 Run with dotnet

(instead of debugger)

01

To run the api with debug on, change into the webApplication1 directory and run

cd WebApplication1
dotnet build

Make sure you are in the directory

02

enter the command

dotnet run

you can now go back to the WebApplication1.http and click send request

03

Notice that breakpoint works the same, just go to the WebApplication1 script and click send request after inserting the breakpoint

04

shorcut for running Send
Command + alt + R

05

(Fixing server)

If you kill the process of dotnet, and try to re-run the process you will encounter an error with the server.

**Notice this where the port is located in the .htpp and launchSetting.json scripts

06

find and kill the server process

Locate the server with the lsof -i command and the port number after the :

lsof -i :port number

Kill the command with the PID

kill -9 PID number

Rerun dotnet

dotnet run

07

Or you can change the port number in the WebApplication1.http and launchSetting.json