0

I currently have a 4.5 .NET framework (not the core one) web/webapi project that I want to debug in VSCode. I've been search for some way to accomplish this, but it seems that VSCode has no support for this (but I have successfully built the whole solution).

I've tried some combinations of debug configurations, such as attaching to w3wp (IIS Worker process) and trying to debug, just as I do in Visual Studio 2017, but did not succeed.

Is there a way to debug a .NET Framework web/webapi (non-core) project in Visual Studio Code?

  • Install the C# extension and changing the DebugType to portable in CSPROJ file, attach the debug process to the IIS express running our application. for the guys ran into the similar issue, please refer to the below links in details, https://codepunk.io/debugging-net-framework-web-applications-in-visual-studio-code/ – Abraham Qian Aug 27 '20 at 05:56

1 Answers1

2

I've managed to succesfully debug. I needed to change a parameter in .csproj file and then attach to iis worker process.

From:

<DebugType>full</DebugType>

To:

<DebugType>portable</DebugType>

My launch configuration on vscode:

{
   "name": "iis attach",
   "type": "clr",
   "request": "attach",
   "processId": "${command:pickProcess}"
}
  • how did you success with this ? can you help? – Sevval Kahraman Sep 13 '20 at 13:56
  • thanks for your reply, i did what you did but, i am choosing dotnet.exe. I don't know how to open a website so i am using local iis address. I cant see breakpoints its gives "no symbols have been loaded for this document". I couldn't find a solution anywhere. I also opened a question in here. I will be so grateful if you can help. – Sevval Kahraman Sep 29 '20 at 10:05
  • isn't dotnet.exe for net core applications? if you are using plain and old .net framework you should attach to w3wp process – Victor Hugo Oct 31 '20 at 02:56