microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.65k stars 285 forks source link

Cannot debug .NET Core Console Application with Remote-WSL with console set to integratedTerminal #4123

Open kglassmireacr opened 3 years ago

kglassmireacr commented 3 years ago

Steps to reproduce:

When I attempt to debug a .NET Core console application with the "console": "integratedTerminal" set in my launch.json, the application runs the build preLaunchTask and appears to just hang. This runs fine in debug with "console": "internalConsole" but I am eventually going to need to provide standard input so integratedTerminal is needed. Also only occurs in Remote-WSL environment. Not a problem running directly on top of Windows 10.

Here is the relevant configuration from the launch.json:

        {
            "name": "Install",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/src/App/bin/Debug/netcoreapp3.1/App.dll",
            "args": [
                "install"
            ],
            "cwd": "${workspaceFolder}/src/App",
            // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
            "console": "integratedTerminal",            
            "stopAtEntry": false
        },   

VS Code version: Code 1.51.1 (e5a624b788d92b8d34d1392e4c4d9789406efe8f, 2020-11-10T23:34:32.027Z) OS version: Windows_NT x64 10.0.18363 Remote OS version: Linux x64 4.19.128-microsoft-standard

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.75GB (7.67GB free)| |Process Argv|--crash-reporter-id d9a9cf1c-a693-49d9-9474-fbdcc4c86e03| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu-18.04| |OS|Linux x64 4.19.128-microsoft-standard| |CPUs|Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)| |Memory (System)|12.28GB (8.65GB free)| |VM|0%|
Extensions (18) Extension|Author (truncated)|Version ---|---|--- azure-devops-snippets|dam|1.0.1 vscode-csharp-snippets|jor|1.0.2 vscode-simple-icons|Lau|1.13.5 remote-containers|ms-|0.148.1 remote-ssh|ms-|0.56.0 remote-ssh-edit|ms-|0.56.0 remote-wsl|ms-|0.51.4 vscode-remote-extensionpack|ms-|0.20.0 vscode-icons|vsc|11.0.0 gitlens|eam|11.0.6 docomment|k--|0.1.19 csharpextensions|kre|1.3.6 azure-pipelines|ms-|1.177.0 vscode-docker|ms-|1.8.1 csharp|ms-|1.23.6 vscode-kubernetes-tools|ms-|1.2.1 azure-account|ms-|0.9.4 vscode-yaml|red|0.13.0 (1 theme extensions excluded)

Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No

kglassmireacr commented 3 years ago

Also, I tried switching to a couple different default shells with no luck. Also, I tried to set "console": "externalTerminal" and found that this at least immediately throws an error as opposed to behavior of integratedTerminal of just hanging with no output in the Terminal window.

kglassmireacr commented 3 years ago

Also I can attach while the program is waiting for input and it will use the integrated terminal for that, just can't use integratedTerminal option for console with "request": "launch" -- below is example of my very typical attach configuration from launch.json:

        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"            
        }