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

Closed
mxdh opened this issue Nov 24, 2018 · 19 comments
Closed

The specified task cannot be tracked #63705

mxdh opened this issue Nov 24, 2018 · 19 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@mxdh
Copy link

mxdh commented Nov 24, 2018

VSCode Version: 1.29.1
OS Version: Win10 1809 x64

Sorry,my English is not good.

After I updated the VSCode and the OS,when I run the debugger, it throws this exception:

tim 20181124120332

my launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "cmd",
            "args": [
                "/c",
                "${file}/../${fileBasenameNoExtension}.exe",
                "&echo.",
                "&pause"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "preLaunchTask": "gcc",
        },
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${file}/../${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "D:/Compiler/MinGW/bin/gdb.exe",
            "preLaunchTask": "gccdbg",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

my task.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "gccdbg",
            "type": "shell",
            "command": "gcc",
            "args": [
                "-std=c++98",
                "-g",
                "-Wall",
                "-Wextra",
                "-v",
                "-H",
                "${relativeFile}",
                "-o",
                "${relativeFile}/../${fileBasenameNoExtension}.exe"
            ],
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        },
        {
            "label": "gcc",
            "type": "shell",
            "command": "gcc",
            "args": [
                "-std=c++98",
                "-Wall",
                "-Wextra",
                "${relativeFile}",
                "-o",
                "${relativeFile}/../${fileBasenameNoExtension}.exe"
            ],
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        }
    ]
}
@vscodebot
Copy link

vscodebot bot commented Nov 24, 2018

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

@weinand weinand added the *caused-by-extension Issue identified to be caused by an extension label Nov 24, 2018
@weinand weinand removed their assignment Nov 24, 2018
@vscodebot
Copy link

vscodebot bot commented Nov 24, 2018

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

@pieandcakes
Copy link
Contributor

@weinand Can you help explain why task processing would be part of the extension? We haven't added task support to the cpp extension so I don't know where I would look to figure out why this user is getting this error?

cc: @WardenGnaw

@weinand
Copy link
Contributor

weinand commented Dec 4, 2018

@isidorn are you able to you help?

@isidorn
Copy link
Contributor

isidorn commented Dec 5, 2018

This usually happens when it is a background task and the user did not specify that in his tasks.json
I suggest to add "isBackground": true to the tasks.json and check if the issue can still re reproduced

@mxdh
Copy link
Author

mxdh commented Dec 5, 2018

@isidorn This problem still exists after I added it.

@isidorn
Copy link
Contributor

isidorn commented Dec 5, 2018

Well that warning will appear if the task does not start after 10 seconds or if it does not send an inactive event.
@a2757326588 Is your task long running and takes more than 10 seconds?
If not than I would forward this question to @alexr00 and @dbaeumer

@mxdh
Copy link
Author

mxdh commented Dec 5, 2018

@isidorn Yes,it is.It takes a long time.
CPU:i5-5200U
RAM:4GM
gcc 6.3.0
May it be caused by performance?

Sorry,my English is not good.

@alexr00
Copy link
Member

alexr00 commented Dec 6, 2018

If you have a task that is long running and needs to be made a background task you also need to add "background" section to your problem matcher because on a background task the inactive event is only sent when there is a problem matcher with a begin and end.

@mxdh
Copy link
Author

mxdh commented Dec 6, 2018

@alexr00 Excuse me,could you give me an example?

@mxdh
Copy link
Author

mxdh commented Dec 6, 2018

Although I use it
https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher
this problem still exists.

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "gccdbg",
            "command": "gcc",
            "args": [
                "-std=c++98",
                "-g",
                "-Wall",
                "-Wextra",
                "-v",
                "-H",
                "${relativeFile}",
                "-o",
                "${relativeFile}/../${fileBasenameNoExtension}.exe"
            ],
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        },
        {
            "label": "gcc",
            "command": "gcc",
            "args": [
                "-std=c++98",
                "-Wall",
                "-Wextra",
                "${relativeFile}",
                "-o",
                "${relativeFile}/../${fileBasenameNoExtension}.exe"
            ],
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        }
    ]
}

@alexr00
Copy link
Member

alexr00 commented Dec 6, 2018

You can see an example of adding background to a problem matcher here: https://github.com/Microsoft/vscode/blob/master/.vscode/tasks.json#L25
You'll also need to make the task background if you do that: https://github.com/Microsoft/vscode/blob/master/.vscode/tasks.json#L9

@mxdh
Copy link
Author

mxdh commented Dec 6, 2018

@alexr00 Thank you,but I don't know how to set an endsPattern of gcc.

Gcc will run after I click to "Debug Anyway" or “Cancel".
If I click to "Debug Anyway", debugger seems to run fine.
Like these:
#37997 (comment)
#37997 (comment)
#37997 (comment)

@mxdh
Copy link
Author

mxdh commented Dec 7, 2018

Sorry to bother you.

After I close the ESET antivirus,it will work fine.

However,when the antivirus is running,gcc(and other executable files) is opened quickly in PowerShell or cmd,but slowly in the terminal of VSCode.Is this normal?

May this problem be caused by poor performance or antivirus?

CPU:i5-5200U
RAM:4GM
Disk:TOSHIBA MQ02ABF050H

Should I buy a new computer?
Or VSCode is Incompatible with ESET?
How about other antivirus?

@alexr00
Copy link
Member

alexr00 commented Dec 7, 2018

@Tyriar do you know why gcc is slower in the integrated terminal while this ESET antivirus is running, but there's no difference in speed when run with Powershell or cmd?

@Tyriar
Copy link
Member

Tyriar commented Dec 7, 2018

My guess is because it's running through winpty, @auchenberg can you reach out to ESET and let them know?

@Tyriar Tyriar reopened this Dec 7, 2018
@alexr00 alexr00 removed their assignment Dec 11, 2018
@mxdh
Copy link
Author

mxdh commented Dec 11, 2018

This problem seems not to be caused ESET now.
Although I close the antivirus,sometimes this problem still arises.

Why does winpty run slowly on my laptop?

@Tyriar
Copy link
Member

Tyriar commented Dec 11, 2018

This is likely related to winpty, tracking in #45693

@Tyriar Tyriar closed this as completed Dec 11, 2018
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 11, 2018
@Tyriar Tyriar self-assigned this Dec 11, 2018
@pieandcakes
Copy link
Contributor

@isidorn @weinand Based on what Tyriar says, can you remove the "caused by extension" tag for people who come across this issue?

@Tyriar Tyriar removed the *caused-by-extension Issue identified to be caused by an extension label Jan 3, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 25, 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)
Projects
None yet
Development

No branches or pull requests

8 participants
@auchenberg @weinand @isidorn @Tyriar @pieandcakes @mxdh @alexr00 and others