Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch hangs on Linux with integratedTerminal #4203

Closed
bobaoapae opened this issue Nov 11, 2020 · 18 comments
Closed

Launch hangs on Linux with integratedTerminal #4203

bobaoapae opened this issue Nov 11, 2020 · 18 comments

Comments

@bobaoapae
Copy link

bobaoapae commented Nov 11, 2020

Issue Description

Remote SSH debug hangs forever on starting application
On vscode 1.50.1 works as expected, on version 1.51 don't work... i aleardy open two issue on vscode repo but they tell me to open a issue here

microsoft/vscode#110253
microsoft/vscode#110154

Steps to Reproduce

Remote SSH, debug .net core application

Expected Behavior

Remote Start: https://prnt.sc/vg9wpp (work as expected)

Actual Behavior

Remote Start: https://prnt.sc/vg9tm2 (10 minutes waiting)

Logs

OmniSharp log

Starting OmniSharp server at 11/11/2020, 1:30:13 PM Target: c:\Users\Administrador\RiderProjects\DDtank\GameServer.sln

OmniSharp server started.
Path: C:\Users\Administrador.vscode-server\extensions\ms-dotnettools.csharp-1.23.5.omnisharp\1.37.3\OmniSharp.exe
PID: 1460

Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Community 2019 16.7.30611.23 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
2: StandAlone 16.8.0 - "c:\Users\Administrador.vscode-server\extensions\ms-dotnettools.csharp-1.23.5.omnisharp\1.37.3.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Community 2019 16.7.30611.23 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'c:\Users\Administrador\RiderProjects\DDtank'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'c:\Users\Administrador\RiderProjects\DDtank\GameServer.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Game.Server\Game.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Game.Service\Game.Service.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\SqlDataProvider\SqlDataProvider.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Bussiness\Bussiness.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Game.Logic\Game.Logic.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Game.Base\Game.Base.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Fighting.Service\Fighting.Service.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Fighting.Server\Fighting.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Center.Server\Center.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Center.Service\Center.Service.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\DatabaseUpdate\DatabaseUpdate.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\PacketFlooder\PacketFlooder.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Flash.Server\Flash.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Administrador\RiderProjects\DDtank\Flash.Service\Flash.Service.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\Users\Administrador\RiderProjects\DDtank'.
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Game.Server\Game.Server.csproj
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\Users\Administrador\RiderProjects\DDtank' on host 12064.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Game.Server\Game.Server.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Game.Server\Game.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Game.Service\Game.Service.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Game.Service\Game.Service.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Game.Service\Game.Service.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\SqlDataProvider\SqlDataProvider.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\SqlDataProvider\SqlDataProvider.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\SqlDataProvider\SqlDataProvider.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Bussiness\Bussiness.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Bussiness\Bussiness.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Bussiness\Bussiness.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Game.Logic\Game.Logic.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Game.Logic\Game.Logic.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Game.Logic\Game.Logic.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Game.Base\Game.Base.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Game.Base\Game.Base.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Game.Base\Game.Base.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Fighting.Service\Fighting.Service.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Fighting.Service\Fighting.Service.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Fighting.Service\Fighting.Service.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Fighting.Server\Fighting.Server.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Fighting.Server\Fighting.Server.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Fighting.Server\Fighting.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Center.Server\Center.Server.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Center.Server\Center.Server.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Center.Server\Center.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Center.Service\Center.Service.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Center.Service\Center.Service.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Center.Service\Center.Service.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\DatabaseUpdate\DatabaseUpdate.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\DatabaseUpdate\DatabaseUpdate.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\DatabaseUpdate\DatabaseUpdate.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\PacketFlooder\PacketFlooder.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\PacketFlooder\PacketFlooder.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\PacketFlooder\PacketFlooder.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Flash.Server\Flash.Server.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Flash.Server\Flash.Server.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Flash.Server\Flash.Server.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Administrador\RiderProjects\DDtank\Flash.Service\Flash.Service.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\Administrador\RiderProjects\DDtank\Flash.Service\Flash.Service.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\Administrador\RiderProjects\DDtank\Flash.Service\Flash.Service.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: Game.Server
info: OmniSharp.MSBuild.ProjectManager
Update project: Game.Service
info: OmniSharp.MSBuild.ProjectManager
Update project: SqlDataProvider
info: OmniSharp.MSBuild.ProjectManager
Update project: Bussiness
info: OmniSharp.MSBuild.ProjectManager
Update project: Game.Logic
info: OmniSharp.MSBuild.ProjectManager
Update project: Game.Base
info: OmniSharp.MSBuild.ProjectManager
Update project: Fighting.Service
info: OmniSharp.MSBuild.ProjectManager
Update project: Fighting.Server
info: OmniSharp.MSBuild.ProjectManager
Update project: Center.Server
info: OmniSharp.MSBuild.ProjectManager
Update project: Center.Service
info: OmniSharp.MSBuild.ProjectManager
Update project: DatabaseUpdate
info: OmniSharp.MSBuild.ProjectManager
Update project: PacketFlooder
info: OmniSharp.MSBuild.ProjectManager
Update project: Flash.Server
info: OmniSharp.MSBuild.ProjectManager
Update project: Flash.Service

C# log

BLANK [https://prnt.sc/vhi3uu](https://prnt.sc/vhi3uu)

###Developer Tools log ###

ERR Cannot read property 'scheme' of null: TypeError: Cannot read property 'scheme' of null at Object.transformIncoming (c:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\uriTransformer.js:4:76) at t.URITransformer.transformIncoming (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:244:220) at I._createTerminalProcess (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:781:351) at I.call (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:780:328) at x.onPromise (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:266:142) at x.onRawMessage (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:265:615) at C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:264:877 at l.fire (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:48:801) at v.fire (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:281:381) at t.PersistentProtocol._receiveMessage (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:286:451) at C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:283:489 at l.fire (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:48:801) at f.acceptChunk (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:278:851) at C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:278:203 at Socket.t (C:\Users\Administrador.vscode-server\bin\fcac248b077b55bae4ba5bab613fd6e9156c2f0c\out\vs\server\remoteExtensionHostAgent.js:288:226) at Socket.emit (events.js:223:5) at addChunk (_stream_readable.js:309:12) at readableAddChunk (_stream_readable.js:290:11) at Socket.Readable.push (_stream_readable.js:224:10) at TCP.onStreamRead (internal/stream_base_commons.js:181:23)

Environment information

VSCode version: 1.51.0
C# Extension: 1.23.5

Dotnet Information SDK do .NET Core (refletindo qualquer global.json): Version: 3.1.403 Commit: 9e895200cd

Ambiente de runtime:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.403\

Host (useful for support):
Version: 3.1.9
Commit: 774fc3d6a9

.NET Core SDKs installed:
3.1.301 [C:\Program Files\dotnet\sdk]
3.1.401 [C:\Program Files\dotnet\sdk]
3.1.403 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
csharp ms-dotnettools 1.23.5
csharpextensions kreativ-software 1.3.6
gitlens eamodio 10.2.3
@gregg-miskelly
Copy link
Contributor

gregg-miskelly commented Nov 11, 2020

Based on your first screen shot, I am assuming you are using VS Code's remote extension support. Correct? Is it getting far enough to start debugging? If so, can you grab a log? (instructions)

@bobaoapae
Copy link
Author

Yes, i'm using remote extension installed on SSH, i just have this error on vscode 1.51, remote build work but remote start hangs forever.

I will send log after i finish some coding here, i need upgrade vscode to get the error

@roblourens
Copy link

roblourens commented Nov 11, 2020

Can someone show me where the dotnet debugger creates a terminal? Does it use the terminal API or the "runInTerminal" debug adapter request? Somehow we get a null cwd and I want to figure out where it comes from.

@roblourens
Copy link

And given the user's launch config back in microsoft/vscode#110253, it's possible there's something else weird going on since all of those have a real cwd specified. But I don't know who's end it's on

@bobaoapae
Copy link
Author

Temporary solution for vscode 1.51 microsoft/vscode#110253 (comment)

@gregg-miskelly
Copy link
Contributor

gregg-miskelly commented Nov 12, 2020

@roblourens Correct, the C# Extension has always passed a null cwd with integrated terminal. I will email you a link to the code.

@gregg-miskelly
Copy link
Contributor

@bobaoapae if you don't need to interact with the stdin of your app, you can also change console to internalConsole (see here) for more info.

@roblourens
Copy link

This "technically" violates the DAP since cwd is required, but it's easy enough for us to handle. FYI @isidorn. We can map the null to undefined which the terminal API expects.

@roblourens
Copy link

roblourens commented Nov 15, 2020

It would be nice if the extension would send undefined instead of null but I have fixed this up on our end in microsoft/vscode#110253. So you can close this issue or whatever you want.

@roblourens
Copy link

@bobaoapae Sorry, I meant that to be directed at @gregg-miskelly and possibly @isidorn to decide whether the extension should change anything here

@bobaoapae bobaoapae reopened this Nov 16, 2020
@isidorn
Copy link
Contributor

isidorn commented Nov 16, 2020

Well ideally the extension should repsect the spec and pass in the cwd.
fyi @weinand since he is the author of the api

@gregg-miskelly
Copy link
Contributor

The spec doesn't actually specify what a debug adapter should do to say "I don't care what cwd is". I can certainly change the implementation to pass undefined but that also doesn't seem to be allowed by the spec. At least when originally implemented, there was a visible side effect (the user could see cd <whatever> in the terminal) if something was provided, and that is why it was intentionally omitted.

@weinand
Copy link

weinand commented Nov 17, 2020

@gregg-miskelly yes, the spec does not support a "don't care" case. And making cwd optional or explicitly supporting null would be a breaking change, so we cannot easily fix this.

Are you passing null because you don't have a better value or because you want to prevent the cd ... command from showing up in the terminal?

@gregg-miskelly
Copy link
Contributor

To prevent the cd ... from showing up.

@weinand
Copy link

weinand commented Nov 17, 2020

@gregg-miskelly I do not yet have a good idea for how to support a "don't care" in the DAP spec, but there is s simple workaround: the empty string ("") will prevent the cd ... and respects the spec.

@gregg-miskelly
Copy link
Contributor

Thanks. I will switch to that.

@weinand
Copy link

weinand commented Nov 17, 2020

@gregg-miskelly I've created microsoft/debug-adapter-protocol#160 for the issue

@gregg-miskelly
Copy link
Contributor

There is now a beta release of the VS Code C# extension that contains this fix: v1.23.8-beta1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants