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

Bad phrasing in debug pre launch task #3333

Closed
joaomoreno opened this issue Feb 23, 2016 · 7 comments
Closed

Bad phrasing in debug pre launch task #3333

joaomoreno opened this issue Feb 23, 2016 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@joaomoreno
Copy link
Member

Testing #2940

image

Maybe something more like:

Errors detected while running task 'compile'.

Also:

image

What's up with the unique?

Could not find the task 'dsa'. Make sure the task exists and it has a unique name.

And this should not be a warning, but an error, since debugging could not go on.

@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Feb 23, 2016
@isidorn isidorn added this to the Feb 2016 milestone Feb 23, 2016
@isidorn isidorn assigned joaomoreno and unassigned isidorn Feb 24, 2016
@chrisdias
Copy link
Member

We should be consistent when referring to the "preLaunch" task because it helps people find the problem, they will look for the term "preLaunch".

So, I suggest the error message is "Could not find preLaunch task 'taskname'. I am not sure we need the second sentence "Make sure the task exists and it has a unique name".

Also, in this case I only have a "Close" option. We should be consistent and use the the same prompts as when there are other errors. I suggest "Continue" and "Stop" in #3438.

@chrisdias chrisdias reopened this Feb 25, 2016
@chrisdias chrisdias assigned isidorn and unassigned joaomoreno Feb 25, 2016
@isidorn
Copy link
Contributor

isidorn commented Feb 25, 2016

We need the second sentence so it is clear to the user what might be the cause of the issue because there might be two tasks with the same name and in that case the user might not be aware what is the real casue.

Continue and stop make no sense in this case since we can not continue until the user fixes his problem in launch.json, and then he has to start debug again

@isidorn isidorn assigned chrisdias and unassigned isidorn Feb 25, 2016
@chrisdias
Copy link
Member

re: Second sentence... How does someone get into the state where there are multiple tasks with the same name? It looks like if I have a gulpfile with multiple tasks gulp always picks the last one and when i run a task from the command palette it always runs the last one, so we should be consistent with when you run a task manually. I have not seen any other errors from running tasks that prompts you to ensure that a task name is unique, therefore I think we should be consistent and we don't need the second sentence.

re: Continue/Stop... The model where there is an error if there is no task.json or gulpfile.js/gruntfile.js is that you can "Debug Anyway". This is essentially the same scenario - the task specified in preLaunch does not exist/is in error. to use the argument above, we should not allow the user to Debug until they fix the fact that they don't have a gulp/grunt file or a tasks.json. Therefore I suggest we follow the same response model with a "Debug Anyway" and "Close".

@chrisdias chrisdias reopened this Feb 25, 2016
@chrisdias chrisdias added the verified Verification succeeded label Feb 29, 2016
@chrisdias
Copy link
Member

looks good.

@ibhub
Copy link

ibhub commented Mar 10, 2016

I have message "Errors detected while running the preLaunchTask" on every task run. But my preLaunchTask does not contain errors, when I run task via "F1->Tasks: Run task" there is no problem.

launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Run local debug",
            "type": "node",
            "request": "launch",
            "cwd": "${workspaceRoot}/build",
            "program": "${workspaceRoot}/build/server.js",
            "outDir":  "${workspaceRoot}/build",
            "stopOnEntry": false,
            "sourceMaps": true,
            "preLaunchTask": "Build debug local"
        }
    ]
}

tasks.json:

{
    "version": "0.1.0",
    "command": "npm",
    "isShellCommand": true,
    "showOutput": "silent",

    "tasks": [
        {
            "taskName": "Build debug local",
            "suppressTaskName": true,
            "args": ["run", "gulp", "--", "--stand=local"],
            "isBuildCommand": true
        }
    ]
}

gulpfile.js:

gulp.task("default", function(done) {
    done();
});

package.json:

{
...
  "scripts": {
    "gulp": "./node_modules/.bin/gulp",
  }
...
}

@chrisdias
Copy link
Member

@ibhub can you open a new issue? This issue is about the text of the message, but you are running into an issue using the feature. Thanks.

CC @weinand @isidorn

@ibhub
Copy link

ibhub commented Mar 12, 2016

@chrisdias ok, thank you. #4070

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants