1

私はこのプロジェクトでは、ASP.NET MVC5 WEBAPIは、それが2015年Visual Studioコードを使用してIIS Expressで実行されているCore ASP.NET MVC5をデバッグする方法はありますか?

<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> 

は私が仕事にVS2015を使用して一時的にできないんだどうなるのVisual Studioを使用して作成されたてきたので、私はしてVisual Studioのコードで働いています今。

OmniSharpはうまく動作していますので、私はIntellisenseを持っていますので、msbuildを使ってソリューションを構築し、IIS Expressを実行して作業をテストすることができます。私が必要とするものはすべてデバッグです。 =/

私は実際にiisexpressインスタンスにvscodeを付けることができますが、シンボルがロードされていないという灰色でブレークポイントを保持します。私はシンボルパスを接続設定で使用しようとしましたが、成功しませんでした。

すべてのデバッグコンソールは言う:

-------------------------------------------------------------------------------- 
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio 
Code, Visual Studio or Visual Studio for Mac software to help you develop and 
test your applications. 
-------------------------------------------------------------------------------- 

はたぶんclrdbgちょうどカントターゲット.NET 4.5.2? 記号を読み込む方法についてさらに詳しい情報が必要なのでしょうか? iisexpressコマンドラインで指示がないことがありますか?

ご協力いただければ幸いです。ありがとう。 :)

ここ

は私が構築する方法である:(それらの両方が正常に動作します

ここ
{ 
    // See https://go.microsoft.com/fwlink/?LinkId=733558 
    // for the documentation about the tasks.json format 
    "version": "0.1.0", 
    "command": "cmd", 
    "isShellCommand": true, 
    "args": ["/c"], 
    "showOutput": "always", 
    "tasks": [ 
     { 
      "taskName": "build", 
      "isBuildCommand": true, 
      "suppressTaskName": true, 
      "args": [ 
       "dotnet build", 
       "${workspaceRoot}\\MyWebApi.sln" 
      ], 
      "showOutput": "always", 
      "problemMatcher": "$msCompile" 
     }, 
     { 
      "taskName": "build with msbuild", 
      "isBuildCommand": true, 
      "suppressTaskName": true, 
      "args": [ 
       "C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe", 
       "${workspaceRoot}\\MyWebApi.sln", 
       "/p:Configuration=Debug;GenerateFullPaths=true", 
       "/t:Rebuild", 
       "/m", 
       "/v:m", 
       "/property:GenerateFullPaths=true" 
      ], 
      "showOutput": "always", 
      "problemMatcher": "$msCompile" 
     } 
    ] 
} 

は私がiisexpress実行する方法である:私は添付する方法をここで

"C:\Program Files\IIS Express\iisexpress.exe" /config:".\.vs\config\applicationhost.config" /site:MyWebApi /apppool:Clr4IntegratedAppPool /trace:e 

{ 
    "version": "0.2.0", 
    "configurations": [ 
     { 
      "name": "Attach to IIS Express", 
      "type": "coreclr", 
      "request": "attach", 
      "processName": "iisexpress" 
     } 
    ] 
} 
+2

[vscode documentation](https://code.visualstudio.com/docs/languages/csharp)によると、これはできません、引用: "注:VS .NET Frameworkで実行されているアプリケーションのデバッグをサポートしていません" – mark

+0

ええ、何時間か後に何かを発見しました。 読書数: https://github.com/OmniSharp/omnisharp-vscode/issues/813 https://github.com/OnniSharp/omnisharp-vscode/issues/283 http://stackoverflow.com/questions/37062818/visual-studio-code-on-osx-import-sln-csproj-and-run vscodeがサポートするとすぐに返信して質問に回答します。 ありがとう@マーク! –

答えて

0

が、私はIISで#cをデバッグすることができました。

私の設定はあなたのものと非常によく似ていますが、launch.jsonのタイプラインを"type": "coreclr"から"type": "clr"に変更してください。これは、IISを使用しているかどうかに関係なく、.NETフレームワークプロジェクトをデバッグできるようにするものです。

関連する問題