X Pahadi
X Pahadi

Reputation: 7443

Debugging ASP.NET 5 App in VS Code

I am trying to debug an App in Visual Studio Code. I created the project with:

yo aspnet //Empty App named myApp
cd "myApp"
dnu restore
dnu build
dnx kestrel

Well fortunately, it runs on http://localhost:5001 but I need to Ctrl-C and rebuild every time. Now, debugging this through VS Code, I have the launch.json file on .vscode folder which has a line:

        // Workspace relative or absolute path to the program.
        "program": "app.js",

Now, I donot have any app.js on the project. How am I supposed to debug this app?

Command section of my launch.json is:

  "commands": {
    "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --config hosting.ini",
    "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini"
  },

Hosting.ini:

server.urls=http://localhost:5000

Upvotes: 1

Views: 1424

Answers (2)

Rafael Miceli
Rafael Miceli

Reputation: 2114

Currently ASP.NET 5 debugging is not supported on any platform, including running ASP.NET 5 on Mono on OS X and Linux. ASP.NET 5 applications are compiled using the Roslyn compiler, not the Mono compiler, and no debug information is being emitted. Visual studio code team hope to provide support for this scenario in an upcoming release.

In visual studio code the supported debugging scenarios are: Node.js based applications, supported on Linux, OS X, and Windows. Debugging of C# applications running on Mono is supported on Linux and OS X.

You can read more on: https://code.visualstudio.com/Docs/editor/debugging

Upvotes: 2

You can't debug ASP.NET 5 with VS Code Preview. ASP.NET 5 debugging support will be added later.

Upvotes: 0

Related Questions