question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extension Not Playing Nice, unable to Debug Code

See original GitHub issue

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json): Version: 2.1.401 Commit: 91b1c13032

Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.401\

Host (useful for support): Version: 2.1.3 Commit: 124038c13e

.NET Core SDKs installed: 2.1.302 [C:\Program Files\dotnet\sdk] 2.1.401 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

VS Code version: 1.27.1 C# Extension version: 1.16.1

Steps to reproduce

VS Code installed an update upon closing. Re-opened and all of my C# code was underlined in red and showing over 10k errors. Uninstalled / Re-installed / Reloaded extension, still getting errors like “Predefined type ‘System.Object’ is not defined or imported”.

Upon removing, all errors go away, but unable to compile code. Re-installing the C# Extension returns all of the errors. Please help, I cannot debug/compile!

Expected behavior

No errors showing. 😃

Actual behavior

Errors are showing. 😦

I feel like the only person having this problem, haven’t found any other forum entries since the VS Code update. I noticed old/new versions in the dotnet --info output, but I do not know how to manage these items or if I even need to delete the older versions.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
4veragecommented, Sep 27, 2018

Okay, after reading through what feels like hundreds of issues posts, I finally have everything working on Laptop #2 (completely fresh install).

For some reason, the line <Project Sdk="Microsoft.NET.Sdk"> does not cross to the physical directory for the SDK. I am not sure if there is a pointer file or something I am missing? However, the age-old work around of setting some mystical MSBuildSdksPath variable never worked for me – or I didn’t know how to do it right.

Eventually, I simply altered the line to read: <Project Sdk="C:\Program Files\dotnet\sdk\2.1.402\Sdks\Microsoft.NET.Sdk"> and… viola! …everything now works!

Unfortunately, no good on Laptop #1 still. A little disappointed that upgrading VS Code broke everything. I really wish I could just go back to using Community at this point. Silly class requirements!

Anyhow, I’m operational at this point. If you can think of anything that could possibly help me with the other laptop, please let me know!

0reactions
cartermpcommented, Sep 23, 2020

I suspect there were several issues related to this, as this kind of problem doesn’t reproduce.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to start debugging. Unexpected LLDB output ... - GitHub
I installed this extension but i cant debug, it only runs the code. I can't see the "yellow line" that goes through my...
Read more >
Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >
Unable to debug VSIX project - Stack Overflow
run F5, in new VS go to Extensions and uninstall your extension; close new VS; in opened Uninstall VSIX window - uninstall your...
Read more >
VS Code Debugger not working for python - Microsoft Q&A
Any troubleshooting tips. It seems when I do Run->"start Debugging' no command comes to terminal. Any VS Code log file that I can...
Read more >
The New Way To Debug JavaScript in VS Code - YouTube
Your browser can't play this video. Learn more. Switch camera ... The New Way To Debug JavaScript in VS Code - No Extension...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found