Skip to content

Ability to suppress "AWSHistory is deprecated and will be removed in the next major release." warning during VSCode debugging? #364

@jakauppila

Description

@jakauppila

Describe the bug

When debugging a Powershell script via VSCode, I'm getting the following log entry written to my terminal quite often.

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.

I'm assuming it's due to the variable watching that vscode does and since it is retrieving $AWSHistory, it's logging that warning.

image

Is there a way to suppress that warning? If not, could one be added?

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

I would like to be able to suppress the log warning since I'm not explicitly accessing the variable so don't care to see it.

Current Behavior

When debugging a Powershell script in VSCode that loads any of the AWS.Tools.* and adding a breakpoint to step through it, it will log the warning once an AWS function is called and $AWSHistory is populated

Reproduction Steps

Within VSCode

Install-Module AWS.Tools.Common

Write-Output 'Hello'

Set-DefaultAWSRegion 'us-east-2'

Write-Output 'World'

Put a breakpoint at the second Write-Output with F9 and press F5 to run the script.

Possible Solution

No response

Additional Information/Context

No response

AWS Tools for PowerShell version used

AWS.Tools.* 4.1.704

PowerShell version used

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

Operating System and version

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.mEffort estimation: mediummodule/powershell-cmdletsp2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions