You can hit Ctrl + K Ctrl + I. This will execute the editor.action.showHover command and will display the same text that is displayed when you hover over for example a function. Unfortunately there seems to be no corresponding editor.action.hideHover command (I searched the keybindings.json). But it should be possible to hide the text again by pressing the Esc key.

Answer from HaaLeo on Stack Overflow
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
autoDocstring: VSCode Python Docstring Generator
Extension for Visual Studio Code - Generates python docstrings automatically
Discussions

Shortcut to display function/method docstring
Normal jupyter notebooks will display the function docstring with alt/option + tab. Can this please be implemented in this extension? The "mouse hovering" idea is awful and only works 1 o... More on github.com
🌐 github.com
1
May 23, 2024
Is there a "quick documentation" shortcut for VS code? - Stack Overflow
In some IDEs, Intellij IDEA for example, pressing control + j will display the docstring like this question. How do I get similar functionality for VS code? More on stackoverflow.com
🌐 stackoverflow.com
Ubuntu 25.04, VSCode docstring keyboard shortcut?
I heard SHIFT+TAB is the keyboard shortcut for Jupyter Notebook to show function docstring. However, I don’t get this functionality in my environment as described in the topic. More on discourse.jupyter.org
🌐 discourse.jupyter.org
2
0
August 13, 2025
visual studio code - Shortcut for getting a python function doc string in VSCode - Stack Overflow
When I use browser to open Jupyter notebooks, I can use Shift + Tab shortcut to get a python function doc string; however, in VSCode, that shortcut does not work. Does anyone know which shortcut gives me the docstring there? More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reddit
reddit.com › r/vscode › how to enable function docstring viewer?
r/vscode on Reddit: How to enable function docstring viewer?
January 28, 2025 -

Okay, so I swear I remember this was a feature when I was using VSCode at some point. Essentially, I either hover or use a special macro to view the parameters or docstring of a function in my code. But with my VSCode version 1.91.1 currently, it's almost like this functionality doesn't exist.

I have tried:

  • Hovering over the function definition with and without parentheses (both native and newly-defined functions)

  • cmd + k, cmd + r (both within and outside the parentheses)

  • cmd + shift + spacebar

  • Looking for an extension, but I don't think I should need to.

Any help would be appreciated. I'm using Python primarily.

🌐
GitHub
github.com › microsoft › vscode-jupyter › issues › 15709
Shortcut to display function/method docstring · Issue #15709 · microsoft/vscode-jupyter
May 23, 2024 - Normal jupyter notebooks will display the function docstring with alt/option + tab. Can this please be implemented in this extension? The "mouse hovering" idea is awful and only works 1 o...
Author: microsoft
🌐
Hrekov
hrekov.com › blog › python-docstring-guide-vscode
How to Easily Write Docstrings in Python Without a Headache (Using VSCode) | Web Tools, Production APIs & Technical Blog | Hrekov
May 10, 2026 - Press Ctrl+Shift+2 (or run Generate Docstring command). VSCode will auto-generate a docstring stub based on the function's signature.
🌐
Python How Tos
campbell-muscle-lab.github.io › howtos_Python › pages › documentation › best_practices › vscode_docstring_extension › vscode_docstring_extension.html
Visual Studio Docstring Extension - Python How Tos
To automatically insert the docstring with proper formatting, you type three quotes, """ like a normal docstring, then hit Enter to let the extension automatically format the docstring.
Author: graykode
Find elsewhere
🌐
Note.nkmk.me
note.nkmk.me › home › python
Python Docstring Formats (Styles) and Examples | note.nkmk.me
August 26, 2023 - Some IDEs and editors allow viewing docstrings through shortcut keys. In Jupyter Notebook, placing the caret over a target function and pressing shift + tab displays the docstring in a tooltip. Holding down shift and repeatedly pressing tab changes the display style. In Visual Studio Code (VSCode) with the Python extension installed, hovering the cursor over the target function shows the docstring in a tooltip.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
python docstrings - Visual Studio Marketplace
Extension for Visual Studio Code - generate python docstrings for classes and methods
🌐
Medium
leowu507.medium.com › how-to-make-writing-docstrings-quick-and-easy-in-vs-code-e6ddfcd0504d
Efficient Docstring Writing with autoDocstring in VS Code | by Leo Wu | Medium
June 20, 2023 - I’m here to share a tool called autoDocstring and some tips to assist you in writing consistent docstrings more efficiently in VS Code.
🌐
Jupyter Community Forum
discourse.jupyter.org › notebook › ipynb
Ubuntu 25.04, VSCode docstring keyboard shortcut? - ipynb - Jupyter Community Forum
August 13, 2025 - I heard SHIFT+TAB is the keyboard shortcut for Jupyter Notebook to show function docstring. However, I don’t get this functionality in my environment as described in the topic.
🌐
Python Engineer
python-engineer.com › posts › vscode-python-setup
My Minimal VS Code Setup for Python - 5 Visual Studio Code Extensions - Python Engineer
Usage: Write a function first, then go to the beginning of the function and type three double quotation marks ("""). Then hit enter, and you get a docstring that already contains the input and return variables.
🌐
DEV Community
dev.to › dev0928 › vs-code-extensions-shortcuts-for-python-web-5c6o
VS Code Extensions / Shortcuts for Python / Web - DEV Community
May 25, 2020 - I use Visual Studio Code editor by Microsoft for Python development. I find below shortcuts and exten...
🌐
Towards Data Science
towardsdatascience.com › home › latest › how to generate docstrings for data science projects
How to Generate Docstrings for Data Science Projects | Towards Data Science
January 22, 2025 - Use keyboard shortcut CTRL+SHIFT+2 for windows or CMD+SHIFT+2 for mac · Use Generate Docstring from VsCode's command palette
🌐
Reddit
reddit.com › r/vscode › what is the "working" python docstring style for vs code tooltips?
r/vscode on Reddit: What is the "working" Python docstring style for VS Code tooltips?
March 11, 2020 -

AFAIK I know, there are three major docstring conventions beyond PEP 257:

  • reST style

  • Google style

  • NumPy style

I use Google style because I find it the simplest. I'm also using type hints throughout my code, which helps keep docstrings readable and concise.

Unfortunately, VS Code's tooltips provide no proper support for any of them. It tries to parse the entire docstring as Markdown, resulting in ugly or illegible tootltips. I recently disabled Jedi in favor of MS Language Server which made the problem worse. (Notes on this below)

I could ditch all docstring conventions and resort to writing Markdown, but it would mean giving up my documentation generation tools (sphinx, pydocmd). Has anyone managed to get docstring tooltips to look good on VS Code?

Sidetrack: Jedi vs MS Language Server?

Note: I disabled Jedi because it wanted to use rope for renaming variables. For some reason, VS Code fails to rename variables even when I install rope in my venv. In contrast, refactoring with MS Language Server just works...though it breaks tooltips even more.

So I am stuck in a dilemma between Jedi & MSLS:

  • Subpar tooltips & no refactoring support, or

  • Even worse tooltips & refactoring support

BTW, I'm using VS Code on Windows 10 with Git Bash as the default terminal. This setup allows me to use Linux commands provided by Git Bash, but has been causing some headaches...

Edit: I just checked again, and reStructuredText actually seems to produce somewhat usable docstrings. The caveat being that there is no way to document class attributes directly (Google style has the Attributes: section).

Top answer
1 of 2
1
I think I see what you mean. It doesn't really answer your question, but here are a couple considerations that can make your life easier in the meantime: I wanted to make the docstrings more legible in the code. I used the extension Highlight to write ugly regexes to match specific characters in a Google-style docstring, to make it more legible, like so . Instead of relying on tooltips, you can rely on another nice feature of VS Code: Peek Definition. It allows you to look to another location in the code in-place. It's a nice way to quickly see what a function does somewhere else in the code. You can bind this operation to a keybind of your liking to do that efficiently. I also recommend using the autoDocstring extension, which works nice. I wrote a custom mustache template to remove types from the Google template, as I rely on the extension sphinx_autodoc_typehints to generate them from my type hints.
2 of 2
1
Coming from TypeScript hurts to have such ugly docs :-P. This was the best custom format I could come up with, which has the advantage of technically being valid yaml so it should be fairly straight forward to parse if needed. https://imgur.com/a/5lgkiYi https://user-images.githubusercontent.com/15365418/89723797-e52f7280-d9c8-11ea-8b6a-9362319e0cea.png class RestResponseExchange(TypedDict): """ Returns basic information about the exchange. ### References - https://docs.idex.io/#get-exchange ### Attributes `timeZone: str`: summary: 'Timezone pass of the exchange' example: 'UTC' `serverTime: int`: summary: 'Current server timestamp in milliseconds' example: 1596938576511
🌐
GitHub
github.com › microsoft › vscode-python › issues › 9016
"Show Hover" does not show docstring when inside parenthesis · Issue #9016 · microsoft/vscode-python
For example code print(), if | is the flashing cursor, then with print(|), Show Hover (Ctrl + K, Ctrl + I) should produce the docstring.
Author: microsoft
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
ChatGPT: Docstring Generator - Visual Studio Marketplace
Extension for Visual Studio Code - Automatically generate Python docstrings using ChatGPT.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
PyDoc - Visual Studio Marketplace
Extension for Visual Studio Code - Generates the docstring for functions and classes