-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Issue Type: Bug
Brief
Debugging stage never starts as building stage defined in task got stuck. The terminal prints out
things like Executing task: /usr/bin/g++ -g <path-to-my-workplace>/main.cpp -o /<path-to-my-workplace>/main and it stays forever.
If I copy, paste and execute the /usr/bin/g++ -g <path-to-my-workplace>/main.cpp -o /<path-to-my-workplace>/main part in my own terminal the program got compiled successfully, however. So I assume it's not either environment setting nor missing dependency e.t.c. that causes the problem.
Steps to replicate
- Set up
main.cpp,launch.jsonandtasks.jsonas specified below:
main.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "hello world!" << endl;
return 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": "g++ - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
task.json
{
"tasks": [
{
"type": "shell",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Build and debug main"
}
],
"version": "2.0.0"
}
- Hit F5
The task got stuck no matter what command I specified in task.json, even specifying a simple ls command (i.e. "command": "ls") .
Extension version: 0.28.3
VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:22.494Z)
OS version: Linux x64 5.3.0-53-generic snap
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 x 3099) |
| GPU Status | 2d_canvas: unavailable_software flash_3d: disabled_software flash_stage3d: disabled_software flash_stage3d_baseline: disabled_software gpu_compositing: disabled_software multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: disabled_off rasterization: disabled_software skia_renderer: disabled_off_ok video_decode: disabled_software viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off_ok webgl: unavailable_software webgl2: unavailable_software |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 7.66GB (0.28GB free) |
| Process Argv | --force-user-env --no-sandbox --unity-launch --no-sandbox |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | ubuntu |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | ubuntu |
| XDG_SESSION_TYPE | x11 |