Skip to content

Hover IntelliSense does not display comment-based help (Synopsis/Description) #5501

@milesbuckton

Description

@milesbuckton

Summary

When hovering over a function call (or its definition) in a .ps1 script, the hover tooltip shows the function signature but does not display the comment-based help content (.SYNOPSIS, .DESCRIPTION, .PARAMETER).

Steps to Reproduce

  1. Create a .ps1 file with a function that has comment-based help:
<#
.SYNOPSIS
    Writes a colored line to the console.
.PARAMETER Message
    The text to display.
.PARAMETER Color
    The foreground color to use.
#>
function WriteColorLine([string] $Message, [ConsoleColor] $Color)
{
    $prev = [Console]::ForegroundColor
    [Console]::ForegroundColor = $Color
    [Console]::WriteLine($Message)
    [Console]::ForegroundColor = $prev
}

WriteColorLine "Hello" Cyan
  1. Hover over WriteColorLine on the call site or the definition.

Expected Behavior

The hover tooltip should display the Synopsis, Description, and Parameter documentation from the comment-based help block (similar to how C# displays XML doc comments).

Actual Behavior

The hover tooltip only shows the function signature. No Synopsis or Description text is displayed.

Tested Placements

All valid comment-based help placements were tested with the same result:

  • Above the function keyword
  • Inside the function body (first statement, before param())
  • Inside the function body with param() block after the help comment

In all cases, Get-Help correctly displays the documentation when the script is dot-sourced, confirming the help syntax is valid.

Environment

  • VS Code PowerShell Extension: v2024.x+
  • OS: Windows 11
  • PowerShell: 7.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions