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

Multiple Process Debugging not possibile with integratedTerminal #37589

Closed
vgammieri opened this issue Nov 3, 2017 · 8 comments
Closed

Multiple Process Debugging not possibile with integratedTerminal #37589

vgammieri opened this issue Nov 3, 2017 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@vgammieri
Copy link

In latest version of VS Code when I debug/launch a long-running process that uses the integratedTerminal setting, and then I decide to launch another process, the latter process will be launched in the same integratedTerminal of the former one, and, because of the fact that the terminal is busy in the execution of the first process, the second one not launch.

Look at the screenshot here below

screen shot 2017-11-03 at 8 55 09 am

  • VSCode Version: 1.17.2
  • OS Version: OSX

Steps to Reproduce:

  1. Setup two launch configuration that use "integratedTerminal" as console to lauch two different scripts;
  2. Put a breakpoint on the fist script so it will pause and wait;
  3. After the first process hit the breakpoint, launch the second one;
  4. The launch of the second process will fail.
@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 3, 2017
@vgammieri
Copy link
Author

I think it's a bug, the same configuration used to launch correctly in previous versions of VS Code

@weinand
Copy link
Contributor

weinand commented Nov 3, 2017

@Tyriar did something change in this area? I haven't touched anything on the debug side.

@weinand weinand added the info-needed Issue requires more information from poster label Nov 3, 2017
@Tyriar
Copy link
Member

Tyriar commented Nov 3, 2017

@weinand nothing comes to mind that would have impacted this. It looks like from this file that you're launching a terminal and reusing it:

https://github.com/Microsoft/vscode/blob/af6b8302fae66a2898ac8180c98221892d6c765f/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts#L45-L53

If the shell is not accepting input because the process is still running as the screenshot suggests, this is as expected. The shell needs to be either accepting input or you need to kill it and respawn the shell.

@vgammieri
Copy link
Author

Is it possible to create a dedicated instance of the 'integratedTerminal' for each launch configuration? So, launching two or more different process won't share the same instance. Even more, you can create a configuration key in the launch configuration to specify if you want to share or not the integratedTerminal.

@Tyriar
Copy link
Member

Tyriar commented Nov 6, 2017

Is it possible to create a dedicated instance of the 'integratedTerminal' for each launch configuration?

It's certainly possible, this is how I was expecting it to work.

@vscodebot vscodebot bot closed this as completed Nov 13, 2017
@weinand weinand reopened this Dec 3, 2017
@weinand weinand added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Dec 3, 2017
@weinand weinand added this to the December 2017/January 2018 milestone Dec 15, 2017
@microsoft microsoft deleted a comment from vscodebot bot Dec 27, 2017
@weinand
Copy link
Contributor

weinand commented Jan 8, 2018

@Tyriar is it possible to find out whether the integrated terminal is accepting input?

For external terminals I'm able to get this information (at least on macOS), so I can reuse an external terminal if it is not busy running a command.

@Tyriar
Copy link
Member

Tyriar commented Jan 8, 2018

@weinand not currently and I'm not aware of how you would. Perhaps you can pull that sort of info by running a tool like lsof, I've seen that used to get the cwd of a shell process.

@weinand
Copy link
Contributor

weinand commented Jan 12, 2018

The fix tries to determine whether the Integrated Terminal's shell process has at least one child process. If it has, we assume that the terminal is busy and a new terminal is created.
With this a compound launch should result in multiple terminals.

@weinand weinand closed this as completed Jan 12, 2018
@weinand weinand added the verification-needed Verification of issue is requested label Jan 29, 2018
@chrmarti chrmarti added the verified Verification succeeded label Feb 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 26, 2018
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 debug Debug viewlet, configurations, breakpoints, adapter issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants