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 #2

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

VSCode remote cpp debug not working #2

liushiqi9 opened this issue May 20, 2019 · 2 comments

Comments

@liushiqi9
Copy link

I am using windows 7 and connect to arch using ssh.
I git clone this repo, and tried to use it.
I am able to compile this repo, but when I press F5 to debug it with breakpoint set to line 7.
Things just hang from here. The program is not running. the left top conner has a little blue block running nostop.

I get terminal result:

Executing task: g++ -g main.cpp -o main.out <
Terminal will be reused by tasks, press any key to close it.

With launch.json set to :

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Main",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/main.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "logging": {
                "trace": true,
                "traceResponse": true,
                "engineLogging": true
            },
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "Build Main"
        }
    ]
}

And my debug console has output as following:

--> E (output): {"event":"output","body":{"category":"console","output":"1: (268) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'\n"},"seq":2,"type":"event"}

1: (268) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (291) LaunchOptions  ExePath='/home/sqliu/workspace/vscode-remote-try-cpp/main.out'\n"},"seq":4,"type":"event"}

1: (291) LaunchOptions  ExePath='/home/sqliu/workspace/vscode-remote-try-cpp/main.out'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (292) LaunchOptions  WorkingDirectory='/home/sqliu/workspace/vscode-remote-try-cpp'\n"},"seq":6,"type":"event"}

1: (292) LaunchOptions  WorkingDirectory='/home/sqliu/workspace/vscode-remote-try-cpp'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (292) LaunchOptions  ExeArguments=''\n"},"seq":8,"type":"event"}

1: (292) LaunchOptions  ExeArguments=''

--> E (output): {"event":"output","body":{"category":"console","output":"1: (293) LaunchOptions  MIMode='gdb'\n"},"seq":10,"type":"event"}

1: (293) LaunchOptions  MIMode='gdb'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (294) LaunchOptions  MIDebuggerPath=''\n"},"seq":12,"type":"event"}

1: (294) LaunchOptions  MIDebuggerPath=''

--> E (output): {"event":"output","body":{"category":"console","output":"1: (295) LaunchOptions  WaitDynamicLibLoad='false'\n"},"seq":14,"type":"event"}

1: (295) LaunchOptions  WaitDynamicLibLoad='false'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (295) LaunchOptions  ExternalConsole='true'\n"},"seq":16,"type":"event"}

1: (295) LaunchOptions  ExternalConsole='true'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (296) LaunchOptions>\n"},"seq":18,"type":"event"}

1: (296) LaunchOptions>

--> E (output): {"event":"output","body":{"category":"console","output":"1: (296) LaunchOptions    <SetupCommands>\n"},"seq":20,"type":"event"}

1: (296) LaunchOptions    <SetupCommands>

--> E (output): {"event":"output","body":{"category":"console","output":"1: (297) LaunchOptions        <Command IgnoreFailures='true' Description='Enable pretty-printing for gdb'>-enable-pretty-printing</Command>\n"},"seq":22,"type":"event"}

1: (297) LaunchOptions        <Command IgnoreFailures='true' Description='Enable pretty-printing for gdb'>-enable-pretty-printing</Command>

--> E (output): {"event":"output","body":{"category":"console","output":"1: (297) LaunchOptions    </SetupCommands>\n"},"seq":24,"type":"event"}

1: (297) LaunchOptions    </SetupCommands>

--> E (output): {"event":"output","body":{"category":"console","output":"1: (298) LaunchOptions</LocalLaunchOptions>\n"},"seq":26,"type":"event"}

1: (298) LaunchOptions</LocalLaunchOptions>

--> E (output): {"event":"output","body":{"category":"console","output":"1: (516) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-zq1tm9f4.x8p ; cd /home/sqliu/workspace/vscode-remote-try-cpp ; DbgTerm=`tty` ; set -o monitor ; trap 'rm /tmp/Microsoft-MIEngine-In-kuo56ybr.bv1 /tmp/Microsoft-MIEngine-Out-ycj4h548.94t /tmp/Microsoft-MIEngine-Pid-zq1tm9f4.x8p /tmp/Microsoft-MIEngine-Cmd-ws0ei0oy.rbc' EXIT ; /usr/bin/gdb --interpreter=mi --tty=$DbgTerm < /tmp/Microsoft-MIEngine-In-kuo56ybr.bv1 > /tmp/Microsoft-MIEngine-Out-ycj4h548.94t & clear; pid=$! ; echo $pid > /tmp/Microsoft-MIEngine-Pid-zq1tm9f4.x8p ; wait $pid; \n"},"seq":28,"type":"event"}

1: (516) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-zq1tm9f4.x8p ; cd /home/sqliu/workspace/vscode-remote-try-cpp ; DbgTerm=`tty` ; set -o monitor ; trap 'rm /tmp/Microsoft-MIEngine-In-kuo56ybr.bv1 /tmp/Microsoft-MIEngine-Out-ycj4h548.94t /tmp/Microsoft-MIEngine-Pid-zq1tm9f4.x8p /tmp/Microsoft-MIEngine-Cmd-ws0ei0oy.rbc' EXIT ; /usr/bin/gdb --interpreter=mi --tty=$DbgTerm < /tmp/Microsoft-MIEngine-In-kuo56ybr.bv1 > /tmp/Microsoft-MIEngine-Out-ycj4h548.94t & clear; pid=$! ; echo $pid > /tmp/Microsoft-MIEngine-Pid-zq1tm9f4.x8p ; wait $pid; 

--> C (runInTerminal-30): {"command":"runInTerminal","arguments":{"kind":"external","title":"cppdbg: main.out","cwd":"","args":["sh","/tmp/Microsoft-MIEngine-Cmd-ws0ei0oy.rbc"],"env":{}},"seq":30,"type":"request"}

--> E (output): {"event":"output","body":{"category":"console","output":"1: (553) Wait for connection completion.\n"},"seq":32,"type":"event"}

1: (553) Wait for connection completion.

@liushiqi9
Copy link
Author

VSCode Version is:
Version: 1.35.0-insider (user setup)
Commit: a5536b8f5a16a10d859f3dec1e59701671bf069e
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

@Chuxel
Copy link
Member

Chuxel commented May 20, 2019

@liushiqi9 According to this comment, the issue appears to be with VS Code Insiders and the C++ extension, not VS Code Remote.

This was also reported here for WSL. Closing as a duplicate given this is not related to a sample and is tracked in two other places.

@Chuxel Chuxel closed this as completed May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants