Skip to content

AWSHistory wrecking the debugger display #5106

@Rom265

Description

@Rom265

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

When I run code with the debugger to step through my code and I hit an AWS command, like get-ec2instance or something, I get between 4 and 10 times the following line shows up in the terminal window: "AWSHistory is deprecated and will be removed in the next major release. Instead, use '-Select *' when it is necessary to return the entire service response as cmdlet output."
So, maybe this is an AWS problem, but I don't understand at all how this is happening, and it only happens when I am debugging in VS Code. And, crucially, every command that I step through after the first time this happens causes that line to appear 4 to 10 times, even non-AWS commands.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : Visual Studio Code Host
Version          : 2024.4.0
InstanceId       : 9b6858bd-e56e-4caa-ad16-01b1a8eacde1
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

1.95.3      
f1a4fb101478ce6ec82fe9627c43efbf9e98c813
x64

Extension Version

ms-vscode.powershell@2024.4.0

Steps to Reproduce

step through code that calls a cmdlet from an AWS.Tools module. I just ran this command:

wait-debugger;C:\scripts\aws\Get-EC2instanceCommonProps-dev.ps1

It opened a new tab with that text and wait-debugger highlighted. The instant that happened, before I even hit F11 to get into the script, it printed the AWSHistory line 36 times.

Visuals

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions