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

"The specified task cannot be tracked" before debugging #75777

Closed
yanghanlin opened this issue Jun 19, 2019 · 10 comments
Closed

"The specified task cannot be tracked" before debugging #75777

yanghanlin opened this issue Jun 19, 2019 · 10 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@yanghanlin
Copy link

yanghanlin commented Jun 19, 2019

Issue Type: Bug

After having today's update of VSCode installed, I cannot succesfully debug my C/C++ program any more.

Steps to reproduce:

  1. Navigate to a file that needs ro run preLaunchTask before debugging, such as a .cpp file;
  2. Press F5 or select Debug > Start debugging to start debugging.

Expected:

The task (in the case of .cpp file, it is to compile the current file) that should be run before launching is successfully executed, and the program is launched for debugging.

Actual:

There pops up a dialog that reads

The specified task cannot be tracked.

And the task that should be run are actually not executed.

Additional info:

When I have not installed this update and everything works well, the terminal panel will pop up and it can be seen that the tasks are being run. However, after this update, when I start debugging, the terminal panel does not pop up, which may indicate that the task needed are actually not being run.

I almost disabled all the extensions (only leaving the language pack and the cpptools extension) and the problem still occurs.

VS Code version: Code - Insiders 1.36.0-insider (6520c22, 2019-06-19T05:19:10.147Z)
OS version: Windows_NT x64 10.0.18917

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 1800)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.92GB (1.20GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (2)
Extension Author (truncated) Version
vscode-language-pack-zh-hans MS- 1.36.0
cpptools ms- 0.24.0-insiders
@vscodebot
Copy link

vscodebot bot commented Jun 19, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@weinand weinand assigned isidorn and unassigned weinand Jun 19, 2019
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jun 19, 2019
@isidorn
Copy link
Contributor

isidorn commented Jun 19, 2019

@alexr00 can you please look into this?

@isidorn isidorn removed the debug Debug viewlet, configurations, breakpoints, adapter issues label Jun 19, 2019
@yanghanlin
Copy link
Author

This issue may be the duplicate of #75774.

@alexr00
Copy link
Member

alexr00 commented Jun 20, 2019

@yanghanlin What happens if run the task from the command palette?

@alexr00
Copy link
Member

alexr00 commented Jun 20, 2019

Also, what does your launch.json and tasks.json look like? I created a C++ project, added a build task, and added a launch config that uses the build task as a preLaunch task. It all works as expected for me. If you have a repo I can clone to reproduce that would really help.

My task:

{
            "label": "build",
            "type": "shell",
            "command": "msbuild",
            "args": [
                "project.vcxproj",
                "/property:GenerateFullPaths=true",
                "/t:build",
            ],
            "group": "build",
            "problemMatcher": "$msCompile"
        }

My launch config:

        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "Debug\\project.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "preLaunchTask": "build"
        }

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Jun 20, 2019
@yanghanlin
Copy link
Author

@alexr00 If I attempt to run the task from the Command Palette, the task will not be executed either, and the terminal panel does not pop up as well. (I did not disable the extension cpptools, as I set the problem matcher as $gcc which can only be recognized by this extension.) This behavior is the same as described in #75774, therefore I think this issue is a duplicate of it.

@yanghanlin
Copy link
Author

@alexr00 I will try to reproduce it and pack them into a repo. Please wait a minute.

@yanghanlin
Copy link
Author

yanghanlin commented Jun 20, 2019

@alexr00 I have reproduced the error again and packed the necessary files into the repository YangHanlin/vscode-troubleshooting.

I can confirm that the same problem occurs in this directory with the current Insiders build, and it works well with the stable build (1.35.1) of VSCode.

You can reproduce the error by:

  1. Clone the repo;
  2. Open the directory in VSCode;
  3. Navigate to the file hello-world.cpp and attempt to start debugging or run the task Compile current file.

Note that I am using g++ and gdb in Mingw-w64 as my toolchain. I am sorry that I don't know how to modify the configuration to use MSVC :-(

PS: During the time I tried to set up this repo, the VSCode received another update. Unfortunately, the tasks cannot run either after the update; and more unfortunately, as I attempt to start debugging, VSCode will not show the error dialog; instead, VSCode will close without any warning or error message.

(I've tried again, and VSCode (today's Insider build) does not suddenly closes now and still gives the error essage The specified task cannot be tracked. So the sudden "crash" I previously saw after the today's update may have nothing to do with this issue and may be more of a performance issue.)

@alexr00
Copy link
Member

alexr00 commented Jun 21, 2019

Yes, this is a duplicate of #75774

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

vscodebot bot commented Jun 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 Jun 21, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants