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

Causes VSCode to always create a new integrated terminal (unintended) #453

Open
2 tasks done
Removed-5an opened this issue Dec 10, 2018 · 6 comments
Open
2 tasks done

Comments

@Removed-5an
Copy link

General information

  • Pure version: latest
  • ZSH version: 5.3
  • Terminal program & version: iTerm
  • Operating system: macOS Mojave
  • ZSH framework: zplug

I have:

  • Tested with another terminal program and can reproduce the issue:
  • Followed the Integration instructions for my framework

Problem description

When using VSCode with integrated terminal debugger every time your restart the debugger vscode creates a new terminal window. This does not happen with bash nor with ZSH with any other theme.

I narrowed it down to the usage of zsh-async somehow.

launch.json:

      "console": "integratedTerminal"

Reproduction steps

  1. Have VSCode create a simple node.js project that you can debug with integrated terminal
  2. Use zplug and load pure and zsh-async
  3. Debug a vscode Node.js project and restart the debugger.

My .zshrc:

source $HOME/.zplug/init.zsh

# zplug plugins
zplug mafredri/zsh-async, from:github

# zplug theme
zplug sindresorhus/pure, use:pure.zsh, from:github, as:theme

# Install packages that have not been installed yet
if ! zplug check --verbose; then
    printf "Install? [y/N]: "
    if read -q; then
        echo; zplug install
    else
        echo
    fi
fi

zplug load
@mafredri
Copy link
Collaborator

@5an1ty could you try out the no-zpty branch of zsh-async?

Keep in mind, it's not feature complete and just a very quick hack, but it mostly works as a drop-in for the current implementation sans some features (like unique job control, flushing, etc).

I'm pretty sure this issue is related to zpty and I don't think there's a way around it without using an alternative method for async execution.

@Removed-5an
Copy link
Author

@mafredri Thanks, but that didn't really help. Changed my zplug to this:

zplug "mafredri/zsh-async", at:no-zpty from:github

And execute zplug update

but didn't really seem to change anything in vscode.

@mafredri
Copy link
Collaborator

Did you confirm it changed the branch? I'm no zplug expert but judging from the documentation it seems there should be a , between at and from.

@Removed-5an
Copy link
Author

Yes there was a missing comma, but I manually checked out the correct branch:

~/.zplug/repos/mafredri/zsh-async no-zpty
❯ git status
On branch no-zpty
Your branch is up to date with 'origin/no-zpty'.

nothing to commit, working tree clean

@mafredri
Copy link
Collaborator

Ok, thanks for confirming. My hunch was that zpty would cause VS Code to be confused about the shell but it seems that is not the case.

Could you point me to a sample project I can try to reproduce this with? I have never used this feature of Code so not sure where to start.

@Removed-5an
Copy link
Author

Very odd, I tried creating a new blank js project and I can't reproduce it. It's specific to one repo it seems. I'll try and update the issue if I figure something out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants