Skip to content

SpecProcId - interactive var replacement supports only string type #1323

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

Merged
merged 1 commit into from
May 23, 2018

Conversation

rkeithhill
Copy link
Contributor

@rkeithhill rkeithhill commented May 18, 2018

Fix #1322

PR Summary

Fixes an issue some folks are seeing in VSCode 1.23.1 and I'm seeing in the insider's build (1.24.0) where using the "Attach to PS Host" debug config will error out after you have selected a process id to attach to. I believe this is due to VSCode getting more strict in the types they allow to be returned from a command evaluated inside a debug config e.g.:

            "processId": "${command:PickPSHostProcess}",

We saw the very same issue with the command that pops UI to ask for script args.

I fixed a bug I ran into while testing this. If you have no documents open, attempt to attach to PS host process, cancel that and then attempt to "Launch Current File" there was an error appearing indicating property document was undefined (or something to that effect). Basically, where we attempt to get the current document, we assume the activeTextEditor is not undefined. Turns out that is a bad assumption.

Also cleaned up some of the error messages that appear when starting up a debug session now that notifications appear "shorter" until expanded.

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

I'm waiting on confirmation of the fix from the folks seeing this issue in 1.23.1.

@rkeithhill rkeithhill added this to the 1.7.1 milestone May 18, 2018
@rkeithhill rkeithhill requested a review from TylerLeonhardt May 18, 2018 03:31
@rkeithhill rkeithhill changed the title SpecProcId - interactive var replacement supports only string type WIP: SpecProcId - interactive var replacement supports only string type May 18, 2018
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great as always, Keith 😀

@rkeithhill rkeithhill changed the title WIP: SpecProcId - interactive var replacement supports only string type SpecProcId - interactive var replacement supports only string type May 18, 2018
@rkeithhill rkeithhill merged commit 247bd27 into master May 23, 2018
@rkeithhill rkeithhill deleted the rkeithhill/fix-specify-processid branch May 23, 2018 02:51
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

Successfully merging this pull request may close these issues.

An error occurs when I try to attach to a Host Process
2 participants