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

VSCode remote cpp debug not working #73987

Closed
liushiqi9 opened this issue May 20, 2019 · 7 comments
Closed

VSCode remote cpp debug not working #73987

liushiqi9 opened this issue May 20, 2019 · 7 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Milestone

Comments

@liushiqi9
Copy link

System Version

Version: 1.35.0-insider (user setup)
Commit: a5536b8
Date: 2019-05-20T05:17:36.269Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 6.1.7601

Steps to Reproduce:

  1. Download lastest vscode insider with remote extension package and C/C++ extension.
  2. Connect to a Arch server with remote ssh.
  3. git clone https://github.com/microsoft/vscode-remote-try-cpp.git
  4. Set a breakpoint at line 7.
  5. Press F5
  6. The debug hangs, binary is compiled, but the gdb is not started. A little blue box is running on left top conner.

Other details(Logs) are listed here. I reported to both repo because I am not sure which one is the correct one.

All help needed, Thx.

@stevehaigh
Copy link

stevehaigh commented May 20, 2019

I repro the same issue, in fact it is not just over remote, C++ debugging does not seem to work in Insiders at all. Code builds via tasks.json but the debugger hangs with the little blue progress worm crawling relentlessly across the top of the debug panel. The exact same settings work in regular VS Code.

Debugging outside VS Code (i..e gdb in the terminal) is fine.

Debugging in regular VS Code also works fine (tested with v1.34.0).

Note this was working fine for me (over remote) on Thursday 16th May. Not sure if a change in the C++ was merged in that time or an update to Insiders caused the issue.

I enable extension debug output but there doesn't seem to be much there:

  Processing folder (recursive): /usr/lib/llvm-6.0/lib/clang/6.0.1/include/
  Processing folder (recursive): /usr/local/include/
  Processing folder (recursive): /usr/include/
  Processing folder (recursive): /home/steve/projects/hello_linux/
  Discovering files: 5078 file(s) processed
  0 file(s) removed from database
Done discovering files.
Parsing remaining files...
  Parsing: 0 files(s) processed
Done parsing remaining files.
Database safe to open

VS Code version details:

Version: 1.35.0-insider
Commit: a5536b8f5a16a10d859f3dec1e59701671bf069e
Date: 2019-05-20T05:15:35.934Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-48-generic snap

tasks.json:

{
    "tasks": [
        {
            "type": "shell",
            "label": "build",
            "command": "/usr/bin/g++",
            "args": [   
                "-g",             
                "${workspaceFolder}/main.cpp",
                "-o",
                "${workspaceFolder}/a.out"
            ],
            "options": {
                "cwd": "/usr/bin"
            }
        }
    ],
    "version": "2.0.0"
}

launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "build"
        }
    ]
}

@yamcenutzer
Copy link

same here,
tested against a ubuntu 1804 remote and a Centos7.6 reomte
mabybe it works for WSL, but that is not a thing here.

@weinand
Copy link
Contributor

weinand commented May 21, 2019

/duplicate #73867

@weinand
Copy link
Contributor

weinand commented May 21, 2019

Fixed in latest Insiders.

@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label May 21, 2019
@vscodebot
Copy link

vscodebot bot commented May 21, 2019

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed May 21, 2019
@weinand weinand added this to the May 2019 milestone May 21, 2019
@liushiqi9
Copy link
Author

liushiqi9 commented May 22, 2019

Still experiencing the problem with C++ at Version:
Version: 1.35.0-insider (user setup)
Commit: 4ca38ce
Date: 2019-05-21T05:18:31.618Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 6.1.7601
@weinand

@weinand
Copy link
Contributor

weinand commented May 23, 2019

@liushiqi9 please create a new issue for your problem with reproducible steps.

The issue hat has been fixed and the original author has confirmed that it works for him now.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants