microsoft / microsoft/vscode-cpptools

Compound 2 cpp applications one doesnt start

Open
#6,613 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger duplicate
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

This is similar to issue #6431
My launch.json is pretty much the same however I see from the log that it is stuck at waiting for connection. One application always starts usually the first one listed in the compound. The issue is intermittent but happens most of the time, sometime changing any argument in launch.json helps mitigate the issue.

Version: 1.51.1 (user setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Debug Console output from the application that fails to start:

--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (251) LaunchOptions{\"name\":\"rendezvous-commander\",\"type\":\"cppdbg\",\"request\":\"launch\",\"program\":\"/workspace/build/rendezvous/rendezvous_commander\",\"args\":[],\"stopAtEntry\":false,\"cwd\":\"/workspace/build\",\"environment\":[],\"externalConsole\":false,\"MIMode\":\"gdb\",\"logging\":{\"engineLogging\":true,\"trace\":true,\"traceResponse\":true},\"setupCommands\":[{\"description\":\"Enable pretty-printing for gdb\",\"text\":\"-enable-pretty-printing\",\"ignoreFailures\":true}],\"__configurationTarget\":5,\"__sessionId\":\"4fe2d8ad-757b-4b04-8ae3-49166ba6c40e\"}\n"},"seq":2}
1: (251) LaunchOptions{"name":"rendezvous-commander","type":"cppdbg","request":"launch","program":"/workspace/build/rendezvous/rendezvous_commander","args":[],"stopAtEntry":false,"cwd":"/workspace/build","environment":[],"externalConsole":false,"MIMode":"gdb","logging":{"engineLogging":true,"trace":true,"traceResponse":true},"setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true}],"__configurationTarget":5,"__sessionId":"4fe2d8ad-757b-4b04-8ae3-49166ba6c40e"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (365) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-5mqlpb4m.6q4 ; cd \"/workspace/build/rendezvous\" ; DbgTerm=`tty` ; set -o monitor ; trap 'rm \"/tmp/Microsoft-MIEngine-In-q41whu8c.a7k\" \"/tmp/Microsoft-MIEngine-Out-88mxb8ba.369\" \"/tmp/Microsoft-MIEngine-Pid-5mqlpb4m.6q4\" \"/tmp/Microsoft-MIEngine-Cmd-ma8x2tc9.iwd\"' EXIT ; \"/usr/bin/gdb\" --interpreter=mi --tty=$DbgTerm < \"/tmp/Microsoft-MIEngine-In-q41whu8c.a7k\" > \"/tmp/Microsoft-MIEngine-Out-88mxb8ba.369\" & clear; pid=$! ; echo $pid > \"/tmp/Microsoft-MIEngine-Pid-5mqlpb4m.6q4\" ; wait $pid; \n"},"seq":4}
1: (365) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-5mqlpb4m.6q4 ; cd "/workspace/build/rendezvous" ; DbgTerm=`tty` ; set -o monitor ; trap 'rm "/tmp/Microsoft-MIEngine-In-q41whu8c.a7k" "/tmp/Microsoft-MIEngine-Out-88mxb8ba.369" "/tmp/Microsoft-MIEngine-Pid-5mqlpb4m.6q4" "/tmp/Microsoft-MIEngine-Cmd-ma8x2tc9.iwd"' EXIT ; "/usr/bin/gdb" --interpreter=mi --tty=$DbgTerm < "/tmp/Microsoft-MIEngine-In-q41whu8c.a7k" > "/tmp/Microsoft-MIEngine-Out-88mxb8ba.369" & clear; pid=$! ; echo $pid > "/tmp/Microsoft-MIEngine-Pid-5mqlpb4m.6q4" ; wait $pid; 
--> C (runInTerminal-6): {"type":"request","command":"runInTerminal","arguments":{"kind":"integrated","title":"cppdbg: rendezvous_commander","cwd":"","args":["/bin/sh","/tmp/Microsoft-MIEngine-Cmd-ma8x2tc9.iwd"],"env":{}},"seq":6}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (395) Wait for connection completion.\n"},"seq":8}
1: (395) Wait for connection completion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the compound launch configuration described in the issue and reproduce the intermittent failure using the Debug Console output, especially the “Wait for connection completion” point. Compare the two applications’ launch behavior and use issue #6431 as related context; done means both C++ applications start reliably in the compound configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.