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

Prelaunch task not working with tasks v2. #22250

Closed
dbaeumer opened this issue Mar 8, 2017 · 20 comments
Closed

Prelaunch task not working with tasks v2. #22250

dbaeumer opened this issue Mar 8, 2017 · 20 comments
Assignees
Labels
info-needed Issue requires more information from poster tasks Task system issues
Milestone

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Mar 8, 2017

  • VSCode Version: 1.10.0

From #981

I have another problem with this:
in launch.json (v 0.2.0) i have added some debugging entries with a preLaunchTask.
when i now debug, i get: There is a task {0} running. Can not run pre launch task build.
if i empty the content of the preLaunchTask, it works but the code is not built before.
Could it be that upgrading the tasks,json to v2.0.0 while having a launch,json at version 0.2.0 creates some incompatibilities?
launch.json
"version": "0.2.0",
"configurations": [{
{
"name": ".NET Core Launch (myapp)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/Services/myapp/src/bin/Debug/netcoreapp1.1/myapp.dll",
"args": [],
"cwd": "${workspaceRoot}/Services/myapp/src/bin/Debug/netcoreapp1.1/",
"stopAtEntry": false,
"externalConsole": false,
"env": {
"ASPNETCORE_ENVIRONMENT": "Local",
"ASPNETCORE_URLS": "http://*:5000"
}
}]
tasks.json
"version": "2.0.0",
"command": "",
"isShellCommand": true,
"args": [],
"tasks": [{
"taskName": "build",
"command": "dotnet",
"args": [
"build"
],
"options": {
"cwd": "${workspaceRoot}"
},
"isBuildCommand": true,
"showOutput": "always",
"problemMatcher": "$msCompile"
},
//... some other tasks here not related to build and a dependency between those.
]}

@dbaeumer dbaeumer self-assigned this Mar 8, 2017
@dbaeumer dbaeumer added this to the March 2017 milestone Mar 8, 2017
@dbaeumer dbaeumer added the bug Issue identified by VS Code Team member as probable bug label Mar 8, 2017
@Jonathan34
Copy link

Thanks!

@dbaeumer
Copy link
Member Author

OK. The problem seems to be that the terminal doesn't signal a process end if that process has never written to the console. Therefore the debugger thinks that the build hasn't finished.

@dbaeumer
Copy link
Member Author

Dups #23119

@dbaeumer dbaeumer added *duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues and removed bug Issue identified by VS Code Team member as probable bug labels Mar 23, 2017
@Jonathan34
Copy link

Jonathan34 commented Mar 30, 2017

@dbaeumer This still does not work with Version 1.11.0-insider although i see the dup is set as fixed.
There is a task {0} running. Can not run pre launch task build.

tasks.json is "version": "2.0.0",
and launch.json is "version": "0.2.0",

@dbaeumer
Copy link
Member Author

@Jonathan34 this is strange. I tested this two days ago and it worked for me without any problems using a comparable TS setup.

@dbaeumer
Copy link
Member Author

@Jonathan34 can you provide me with a sample I can clone to further investigate ?

@dbaeumer dbaeumer reopened this Mar 31, 2017
@dbaeumer dbaeumer modified the milestones: April 2017, March 2017 Mar 31, 2017
@dbaeumer dbaeumer added info-needed Issue requires more information from poster and removed *duplicate Issue identified as a duplicate of another issue(s) labels Mar 31, 2017
@dbaeumer
Copy link
Member Author

Here is what I see with dotnet core and a simple console app.

cast

@dbaeumer
Copy link
Member Author

So there must be something different with our setup which I don't see.

@Jonathan34
Copy link

I just received an update to commit: cc46bbf (2017-03-31T13:40:54.578Z) and now it seems to work!

I did an update yesterday, may be it was not there yet?

Can be closed!

@alexriedl
Copy link

alexriedl commented Mar 31, 2017

I just got the latest inside build and I am still having this issue. It seems to happen after I run a different task, then try to launch my application.
Example steps I ran:

  1. "ctrl+p" - type in "task test"
  2. Let tests run and finish
  3. "f5" - to launch the application

There is a task {0} running. Can not run pre launch task build. message pops up.

@dbaeumer
Copy link
Member Author

dbaeumer commented Apr 3, 2017

@alexriedl thanks a lot for the steps. Was able to reproduce.

@Jonathan34
Copy link

Jonathan34 commented Apr 3, 2017

Sorry, if i click the play button on the top left to start debugging, it says There is a task {0} running. Can not run pre launch task build. so this is not yet fixed i guess.

I can send the launch.json and tasks.json if you need, just give me one email address

Updated up to 2017-04-03T05:22:32.677Z

@dbaeumer
Copy link
Member Author

dbaeumer commented Apr 4, 2017

@Jonathan34 this needs a released insider build which has not happened yet since we are in endgame process. The build must be at least 2017-04-04:....

@dbaeumer
Copy link
Member Author

dbaeumer commented Apr 4, 2017

If you can still reproduce in a newer build can you please provider a reproducible case. Simply having the tasks.json and launch.json is most of the time not enough. Best would be a GitHub repository to clone from.

@Jonathan34
Copy link

@dbaeumer works with 2017-04-04T10:14:08.729Z!
thanks

@alexriedl
Copy link

alexriedl commented Apr 4, 2017

The issue is still happening with the insider build 2017-04-04T10:22:56:510Z.

I through together a small project that is structured similar to my project to demo the issue in my github. Steps to reproduce are in the readme. Let me know if you need any other details.

@Jonathan34
Copy link

Jonathan34 commented Apr 4, 2017

yes i confirm @alexriedl ! i just got it again... not sure what happens :s

@dbaeumer
Copy link
Member Author

dbaeumer commented Apr 5, 2017

@alexriedl @Jonathan34 sorry, my fault. The fix went into master, but the current insiders are build for the release/1.11 branch. When we have released 1.11 the insider will switch to master again and then the fix will be available there. Sorry for the confusion around this.

peppy added a commit to peppy/osu that referenced this issue Apr 26, 2017
Adds debug/release launching. Cleans up much. Also updates tasks.json schema to 2.0.0 which supports multiple commands.

Can't use until microsoft/vscode#22250 is fixed.
@jagadeesh1492
Copy link

@dbaeumer
Copy link
Member Author

@jagadeesh1492 This got addressed in the latest inside build and will be available in the next release. A workaround is to close and reopen VS Code on the workspace.

@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
info-needed Issue requires more information from poster tasks Task system issues
Projects
None yet
Development

No branches or pull requests

4 participants