Skip to content

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

Closed as duplicate

Description

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

Activity

  1. JustinGrote commented on Jun 3, 2026

    @JustinGrote
    Collaborator

    Thanks for your submission! This is a known item we do want to address, it's a little tricky however.

  2. andyleejordan commented on Jun 16, 2026

    @andyleejordan
    Member

    Same underlying request as #1577 (surfacing comment-based help for functions); consolidating on the older canonical issue, which also covers the hover case.

    🤖 Drafted by GitHub Copilot at Andy Jordan (@andyleejordan)'s request — pending maintainer review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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