Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Comment in try-catch exception parameter not highlighting

Open
#127 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
tooling

Research direction

Start by reproducing the reported snippet in VS Code 1.24.0 with the C# extension 1.15.2, then inspect the C# syntax grammar rules handling catch parameters and comments. Done means the comment inside the exception parameter is highlighted as a comment rather than as a variable name.

Written by the indexing model from the issue text.

Description

Bug

Details

VS Code version: 1.24.0
C# Extension version: 1.15.2

Steps to reproduce

try { /* Stuff */ }
catch ( ExceptionType /* This comment isn't highlighted as a comment */ ) { /* stuff */ }

This is part of example code from the ASP.Net Core tutorials https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/crud?view=aspnetcore-2.1

Expected behavior

The comment inside the parentheses should be highlighted as a comment.

Actual behavior

The comment inside the parentheses is highlighted as a variable name, as if it were an ExceptionType.

Dominant language
TypeScript
Stars
78
Forks
43
Avg merge
34m
Merged PRs (30d)
1

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/csharp-tmLanguage

All issues in dotnet/csharp-tmLanguage

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.