-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Compound launch configs with integrated terminals and nodemon no longer start reliably after 1.33.0 #71850
Comments
Unfortunately this is still present in 1.34.0. The interesting thing is - when launching configs one-by-one there is no issue. The issue only occurs when multiple configs are launched simultaneously via a compound config. Everything worked perfectly before 1.33 so this is very strange.... @weinand Is there any information I could provide to help resolve this? |
Okay, after some investigations I have established that the issue doesn't occur if i set
It only occurs with Over the next few days I will try to find time to run a simple experiment to see if this is a general problem with launching multiple integrated terminals simultaneously on macOS.... or whether it is specific to my configuration choices somehow (e.g. nodemon). At least I now have a workaround with external terminals. 😀 |
After further investigation I've created a simple compound config to reproduce this issue. When running it often one or more of the configs fail. The behaviour is not deterministic but for me seems to occur at least half the time. I did find it necessary to use a runtimeExecutable (nodemon) to trigger the behaviour and am using three simple Node JS files (index1.js, index2.js, and index3.js) which consist of the single line (As an aside, a weird thing I've also noticed is sometimes two processes seem to be put in the same integrated terminal with compound configs but generally each gets a separate terminal as expected for the compound config below.) Please let me know if I can provide any further info in relation to this issue. Everything as far as I know is up-to-date, e.g. Nodemon version is 1.19.0, Node version is 12.1.0 etc Compound config:
|
Unfortunately this issue is still present in 1.37 🙁 |
In case it helps anyone, a workaround I have begun using is to assign to each debug config a pre-launch task that delays the start of the config. As long as the configs each have a different delay they all now start fine. Example pre-launch task:
|
This really annoying issue is still present in Is it really hard to reproduce, or does it only affect a small minority of the users?
My launch.json looks like this: {
"version": "0.2.0",
"configurations": [
{
"name": "A",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/A/bin/Debug/netcoreapp3.1/A.dll",
"args": [],
"cwd": "${workspaceRoot}/A",
"linux": {
"env": { "ASPNETCORE_ENVIRONMENT": "${env:USER}" },
},
"env": { "ASPNETCORE_ENVIRONMENT": "${env:USERNAME}" },
},
{
"name": "B",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/B/bin/Debug/netcoreapp3.1/B.dll",
"args": [],
"cwd": "${workspaceRoot}/B",
"linux": {
"env": { "ASPNETCORE_ENVIRONMENT": "${env:USER}" },
},
"env": { "ASPNETCORE_ENVIRONMENT": "${env:USERNAME}" },
},
],
"compounds": [
{
"name": "A+B",
"configurations": ["A", "B"]
},
]
} |
Additionally, I have tested that this is independent of |
I just found that this is caused by the presence of any I also tried the recommendation above with different sleep times. This does not affect the behaviour in any way. I tried the recommendation above exactly as given, and after some modification found out that this has nothing to do with sleep, and different times. The reason it works is that the OP distinctly named each preLaunchTask. I do that, it works because all tasks are launched separately and simultaneously, regardless of their actions. I tried both letting all tasks run My hypothesis is that this is a bug in the preLaunchTask bundling of the compound launch mechanism. It seems that when multiple launches share a single preLaunchTask, it is only run once. However once it has run, it seems to have forgotten the original compound composition and launches only one (probably always the first) launch configuration of the compound. The error does not occur when I move the preLaunchTask from the individual launch configurations to the compound preLaunchTask. However, this is not a valid situation, since I need to launch the individual configurations themselves as well regularly. The error does occur when I copy the preLaunchTask used in the individual launch configurations to the compound preLaunchTask. |
Fixes #71850 Adds more resilient handling of multiple debug terminals, reusing terminals and adding a 1-second "lock out" before a terminal is candidate for reuse.
Issue Type: Bug
When starting compound launch config with members like shown below, some of the configs often (but not always) now fail with error of the type:
Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:26333).
This only started happening after upgrade to VS Code 1.33.0.
VS Code version: Code 1.33.0 (0dd516d, 2019-04-04T15:11:32.076Z)
OS version: Darwin x64 18.5.0
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (9)
The text was updated successfully, but these errors were encountered: