dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 673 forks source link

ASP.NET Core site on https is still running after stop of local debugging process #5316

Closed IntoLighter closed 2 years ago

IntoLighter commented 2 years ago

Issue Description

I tried to restart computer, but it didn't help. How could I get rid of them?

Steps to Reproduce

  1. Open any ASP.NET Core site with specified urls in localSettings.json in vs code
  2. Debug it using .NET Core launch default configuration
  3. Stop debuggin process

Expected Behavior

Stop all processes and sites on all urls.

Actual Behavior

Site is running on https url.

Logs

OmniSharp log

Starting OmniSharp server at 7/23/2022, 3:27:07 PM Target: /Users/a/RiderProjects/Marketplace/Marketplace.sln

OmniSharp server started with .NET 6.0.301 . Path: /Users/a/.vscode/extensions/ms-dotnettools.csharp-1.25.0-darwin-arm64/.omnisharp/1.39.0-net6.0/OmniSharp.dll PID: 5806

    Starting OmniSharp on Unknown 0.0 (Unknown)
    Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
    Using the 'dotnet' on the PATH.
    DotNetPath set to dotnet
    Located 1 MSBuild instance(s)
        1: .NET Core SDK 6.0.301 17.2.0 - "/usr/local/share/dotnet/sdk/6.0.301/"
    Registered MSBuild instance: .NET Core SDK 6.0.301 17.2.0 - "/usr/local/share/dotnet/sdk/6.0.301/"
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
    Detecting projects in '/Users/a/RiderProjects/Marketplace/Marketplace.sln'.
    Queue project update for '/Users/a/RiderProjects/Marketplace/Web/Web.csproj'
    Queue project update for '/Users/a/RiderProjects/Marketplace/Domain/Domain.csproj'
    Queue project update for '/Users/a/RiderProjects/Marketplace/Infrastructure/Infrastructure.csproj'
    Queue project update for '/Users/a/RiderProjects/Marketplace/Application/Application.csproj'
    Detecting CSX files in '/Users/a/RiderProjects/Marketplace'.
    Did not find any CSX files
    Configuration finished.
    Omnisharp server running using Stdio at location '/Users/a/RiderProjects/Marketplace' on host 5743.
    Loading project: /Users/a/RiderProjects/Marketplace/Web/Web.csproj
    Successfully loaded project file '/Users/a/RiderProjects/Marketplace/Web/Web.csproj'.
    Adding project '/Users/a/RiderProjects/Marketplace/Web/Web.csproj'
    Loading project: /Users/a/RiderProjects/Marketplace/Domain/Domain.csproj
    Successfully loaded project file '/Users/a/RiderProjects/Marketplace/Domain/Domain.csproj'.
    Adding project '/Users/a/RiderProjects/Marketplace/Domain/Domain.csproj'
    Loading project: /Users/a/RiderProjects/Marketplace/Infrastructure/Infrastructure.csproj
    Successfully loaded project file '/Users/a/RiderProjects/Marketplace/Infrastructure/Infrastructure.csproj'.
    Adding project '/Users/a/RiderProjects/Marketplace/Infrastructure/Infrastructure.csproj'
    Loading project: /Users/a/RiderProjects/Marketplace/Application/Application.csproj
    Successfully loaded project file '/Users/a/RiderProjects/Marketplace/Application/Application.csproj'.
    Adding project '/Users/a/RiderProjects/Marketplace/Application/Application.csproj'
    Update project: Web
    Update project: Domain
    Update project: Infrastructure
    Update project: Application
    Solution initialized -> queue all documents for code analysis. Initial document count: 81.

Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request.

    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 18, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 19, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 20, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 22, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 27, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 32, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 37, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 42, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 47, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 47, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 42, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 37, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 32, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 27, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 22, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 20, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 19, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 18, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 18, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 19, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 20, Column: 7.
    No symbol found. File: /Users/a/RiderProjects/Marketplace/Web/Areas/Shop/Pages/Catalog.cshtml.cs, Line: 22, Column: 7.

Received response for /quickinfo but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /quickinfo but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /quickinfo but could not find request.

    ************ Request ************

{ "Type": "request", "Seq": 805, "Command": "/close", "Arguments": { "FileName": "/Users/a/RiderProjects/Marketplace/Web/Pages/Index.cshtml__virtual.cs" } }

    ************  Response (17.2364ms) ************ 

{ "Request_seq": 805, "Command": "/close", "Running": true, "Success": false, "Message": "\"System.ArgumentException: '' is not part of the workspace.\n at Microsoft.CodeAnalysis.Workspace.CheckDocumentIsInCurrentSolution(DocumentId documentId)\n at Microsoft.CodeAnalysis.Workspace.OnDocumentClosed(DocumentId documentId, TextLoader reloader, Boolean updateActiveContext)\n at OmniSharp.OmniSharpWorkspace.CloseDocument(DocumentId documentId) in /Users/runner/work/1/s/src/OmniSharp.Roslyn/OmniSharpWorkspace.cs:line 106\n at OmniSharp.Roslyn.CSharp.Services.Files.FileCloseService.Handle(FileCloseRequest request) in /Users/runner/work/1/s/src/OmniSharp.Roslyn.CSharp/Services/Files/FileCloseService.cs:line 25\n at OmniSharp.Endpoint.EndpointHandler2.AggregateResponsesFromLanguageHandlers(ExportHandler2[] handlers, TRequest request) in /Users/runner/work/1/s/src/OmniSharp.Host/Endpoint/EndpointHandler.cs:line 191\n at OmniSharp.Endpoint.EndpointHandler2.HandleRequestForLanguage(String language, TRequest request, RequestPacket packet) in /Users/runner/work/1/s/src/OmniSharp.Host/Endpoint/EndpointHandler.cs:line 234\\n at OmniSharp.Endpoint.EndpointHandler2.Process(RequestPacket packet, LanguageModel model, JToken requestObject) in /Users/runner/work/1/s/src/OmniSharp.Host/Endpoint/EndpointHandler.cs:line 143\n at OmniSharp.Stdio.Host.HandleRequest(String json, ILogger logger) in /Users/runner/work/1/s/src/OmniSharp.Stdio/Host.cs:line 258\"", "Body": null, "Seq": 999, "Type": "response" } Received response for /v2/getcodeactions but could not find request.

C# log

[WARNING]: arm64 macOS is not officially supported by the .NET debugger. You may experience unexpected issues when running in this configuration.

Environment information

VSCode version: 1.69.2 C# Extension: 1.25.0

Mono Information OmniSharp using mono :6.12.0
Dotnet Information .NET SDK (reflecting any global.json): Version: 6.0.301 Commit: 43f9b18481 Runtime Environment: OS Name: Mac OS X OS Version: 12.4 OS Platform: Darwin RID: osx.12-arm64 Base Path: /usr/local/share/dotnet/sdk/6.0.301/ Host (useful for support): Version: 6.0.6 Commit: 7cca709db2 .NET SDKs installed: 6.0.301 [/usr/local/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |create-file-from-template|huynh-quang-phuc|0.1.1| |csharp|ms-dotnettools|1.25.0| |data-workspace-vscode|ms-mssql|0.2.2| |git-extension-pack|donjayamanne|0.1.3| |githistory|donjayamanne|0.6.19| |gitignore|codezombiech|0.8.0| |gitlens|eamodio|12.1.2| |JavaScriptSnippetsStandard|jmsv|1.8.0| |jupyter|ms-toolsai|2022.6.1201981810| |jupyter-keymap|ms-toolsai|1.0.0| |jupyter-renderers|ms-toolsai|1.0.9| |latex-workshop|James-Yu|8.27.2| |mssql|ms-mssql|1.15.0| |npm-intellisense|christian-kohler|1.4.2| |open-in-browser|techer|2.0.0| |path-intellisense|christian-kohler|2.8.1| |project-manager|alefragnani|12.6.1| |python|ms-python|2022.10.1| |ReactSnippets|xabikos|2.4.0| |search-node-modules|jasonnutter|1.3.0| |sql-bindings-vscode|ms-mssql|0.2.1| |sql-database-projects-vscode|ms-mssql|0.17.2| |vim|vscodevim|1.23.1| |vs-code-prettier-eslint|rvest|5.0.3| |vscode-docker|ms-azuretools|1.22.1| |vscode-dotnet-watch|Murugaratham|1.1.3| |vscode-eslint|dbaeumer|2.2.6| |vscode-npm-script|eg2|0.3.28| |vscode-nuget-gallery|patcx|0.0.24| |vscode-open-in-github|ziyasal|1.3.6| |vscode-pylance|ms-python|2022.7.40| |vscode-typescript-next|ms-vscode|4.8.20220722|;
gregg-miskelly commented 2 years ago

@IntoLighter can you be more specific about what you mean by "Site is running on https url."?

Are you talking about the web browser still being open? The target process itself still being around? Something still listening on the port?

IntoLighter commented 2 years ago

@gregg-miskelly Site still listening on the port.

gregg-miskelly commented 2 years ago

@IntoLighter My guess is that the issue is that you have a child process of your project's process that is still running. Can you see what process has the port open? I think you can do this with sudo lsof -i :<port_number_here>

IntoLighter commented 2 years ago

I got it. It was pwa, which cached all its data in browser, and was opening without server running.