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
tasks.onDidStartTaskProcess gives the wrong processId if there is a "dependsOn" task #118256
Comments
@Tyriar for this process ID tasks has always just used the |
Looks like something is out of sequence in the integrated terminal. Tasks just uses the process ID from terminal. I would expect that the pid is set in the terminal before the terminal event that tasks uses fires. However, it's clear that's not happening. To repro, checkout my branch and run from source.
Run the "Run this task" task. |
To help with your investigation, this was first reported to us on February 8th "with the most recent update to the Insiders version" (although we didn't realize at the time what was going on). Something changed between v1.53 and that date to cause this regression |
@fiveisprime @chrisdias @alexr00 @Tyriar @meganrogge what are the chances this will make it out in a recovery build for VS Code? Matt implied he was trying to get this included with v1.54.2, but that obviously didn't happen. This was a regression in the v1.54 release that completely broke C# debugging for the Azure Functions extension, the same week we announced .NET 5 support in conjunction with the platform. We shipped a workaround last week that seems to fix the issue on our end, but let's just say I'm not super confident in it. Basically, we check if the processId we got from |
@ejizba sorry about this regression, must have slipped through with the major refactors that happened to bring in persistent terminal processes. I'll investigate tomorrow morning. The workaround seems like it should work, the only concern is that |
This was caused by the env var relaunch @debounce decorator that was added to prevent the process from relaunching multiple times when multiple extensions contribute to the environment. This caused the reuseTerminal call to not have the new processReady promise ready immediately after reuseTerminal was called. The fix which seems safe it to just move the @debounce over to relaunchTerminal that tasks doesn't use. Fixes #118256
This is fixed for me on the latest insiders, thanks! Just to confirm - this missed the recovery releases and will be going out with 1.55? |
@ejizba good to hear 🙂 yes it'll be going in 1.55, it sounds like the workaround is solid enough in the meantime. Again sorry about the hassle. When you remove the workaround for 1.55 you'll also want to bump the vscode engine version in package.json so people who haven't updated VS Code won't hit issues. |
Verified that this issue is fixed, but now I get some extra console errors:
|
Issue Type: Bug
activate
method (and add"*"
as an activationEvent to make sure it activates):Expected Result:
I will see two info messages, with different pid's.
Actual Result:
I see two info messages, with the same pid - I'm guessing it's the pid from "taskToDependOn":
Important Notes:
Start-Sleep -Seconds 3
to get the task to work in PowerShellVS Code version: Code 1.54.1 (f30a9b7, 2021-03-04T22:42:18.719Z)
OS version: Darwin x64 20.3.0
System Info
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: