You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compound launch configs with integrated terminals and nodemon no longer start reliably after 1.33.0 #71850
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded
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.... Andre Weinand (@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
"console": "externalTerminal"
It only occurs with "console": "integratedTerminal" where it would appear often some integrated terminals simply don't launch.
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. 😀
changed the title [-]Compound launch configs no longer start reliably with 1.33.0[/-][+]Compound launch configs with integrated terminals no longer start reliably with 1.33.0[/+]on May 19, 2019
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 setTimeout(() => {console.log('hi')}, 5000)
(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
changed the title [-]Compound launch configs with integrated terminals no longer start reliably with 1.33.0[/-][+]Compound launch configs with integrated terminals and nodemon no longer start reliably after 1.33.0[/+]on May 21, 2019
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.
Additionally, I have tested that this is independent of nodemon and integratedTerminal even without nodemon and with externalTerminal the behaviour is the same.
I just found that this is caused by the presence of any preLaunchTask. If I remove those it works flawlessly, however I need my dotnet application to be built before launch.
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 sleep 1 and letting all tasks run an empty command. Both worked.
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.
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded
Activity
markm77 commentedon May 18, 2019
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.... Andre Weinand (@weinand) Is there any information I could provide to help resolve this?
markm77 commentedon May 19, 2019
Okay, after some investigations I have established that the issue doesn't occur if i set
It only occurs with
"console": "integratedTerminal"where it would appear often some integrated terminals simply don't launch.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. 😀
[-]Compound launch configs no longer start reliably with 1.33.0[/-][+]Compound launch configs with integrated terminals no longer start reliably with 1.33.0[/+]markm77 commentedon May 20, 2019
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
setTimeout(() => {console.log('hi')}, 5000)(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:
[-]Compound launch configs with integrated terminals no longer start reliably with 1.33.0[/-][+]Compound launch configs with integrated terminals and nodemon no longer start reliably after 1.33.0[/+]markm77 commentedon Aug 9, 2019
Unfortunately this issue is still present in 1.37 🙁
markm77 commentedon Aug 16, 2019
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:
Ghostbird commentedon Sep 7, 2020
This really annoying issue is still present in
1.48.2.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"] }, ] }Ghostbird commentedon Sep 16, 2020
Additionally, I have tested that this is independent of
nodemonandintegratedTerminaleven withoutnodemonand withexternalTerminalthe behaviour is the same.Ghostbird commentedon Sep 16, 2020
I just found that this is caused by the presence of any
preLaunchTask. If I remove those it works flawlessly, however I need mydotnetapplication to be built before launch.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
sleep 1and letting all tasks run an empty command. Both worked.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.
debug: fix compound integrated terminal launches breaking
debug: fix compound integrated terminal launches breaking