Copilot /doc #<filename>:from_line_no-to_line_no prompt, response for entire class #171310
Replies: 1 comment
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Copilot Feature Area
Visual Studio
Body
Using VisualStudio 2022 17.14.13 (August 2025), GitHub Copilot Pro (subscription).
I often use /doc prompt to add a function header comment, which details the purpose of the function, the parameters and return value. It is very very useful when maintaining a legacy application (as I do). In recent times /doc has changed and is broken. It doesn't matter which model I choose to use, they all seem do the same thing (incorrectly) with /doc
A prompt "/doc the code in #filename:from_line_no-to_line_no" will no longer limit the response to a single function, instead CoPilot response includes the whole class with every function given a new header comment, which takes a long time. If I did not choose a x0 or x1 model I would be burning through my CoPilot Pro monthy allowance!!
What is also wrong is when accepting the response usong the function between from_line_no and to_line_no is replaced with the whole class - so there is a class within a class and compilation fails.
I don't type the prompt out longhand either - I open an inline chat prompt with +/ and enter '/doc' and press enter. The prompt then suggest auto completion options that includes # followed by colon and the line number range for the function under the cursor.
Edit: I just figured out I can change the prompt to "/doc functionname in #filename:from_line_no-to_line_no" and it works. I have an issue with 'the code' in the automatic suggestion. :/
This automated function annotation worked beautifully, but its broken today.
Beta Was this translation helpful? Give feedback.
All reactions