Can't debbug on VS Code

"I’ve been troubleshooting Unity debugging in Visual Studio Code all day, but I keep encountering an error. When I attempt to debug in VS Code, I receive the following message: ‘My project\Assembly-CSharp.csproj’ does not support debugging. No launchable target found.’

Here are the steps I’ve taken so far:

  • I’ve ensured that my Unity External Tools are configured to use Visual Studio Code [version 1.87.2].
  • I’ve regenerated project files.
  • Both the ‘Visual Studio Code Editor’ [version 1.2.5] and ‘Visual Studio’ [version 2.0.22] packages are active in Unity.
  • In VS Code, I’ve installed the following extensions:
    • ‘C# Dev Kit’ [version 1.4.29]
    • ‘Unity’ [version 1.0.0]
    • ‘C#’ [version 2.22.5]
    • ‘.Net Install tools’

Additionally, I have .NET 8 installed on my PC.

Despite these efforts, I’m still encountering the error mentioned above. Any insights or suggestions on how to resolve this issue would be greatly appreciated!"