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.

Downloads tools for .NET when trying to open launch.json for non-.NET project

See original GitHub issue

Issue Description

We did a workshop on React development at my company today. As I wanted to create a new launch.json file to set up the Chrome debugger, the C# extension got activated and started downloading OmniSharp, the .NET Core debugger and the Razor Language Server.

Steps to Reproduce

  1. Update the C# extension from an older version

    The extension has to download new versions of the .NET tools the next time.

  2. Install the Chrome debugger extension

  3. Start a new web project

  4. Run the “Debug: Open launch.json” command and select Chrome

Expected Behavior

A newly generated launch.json should be opened.

Actual Behavior

The C# extension kicks in and starts downloading 150 MB worth of dependencies, even though my project has absolutely nothing to do with .NET.

Logs

OmniSharp log

Nothing to see here.

C# log

Note: The output is incomplete because I had to restart VS Code. My companies Wi-Fi stopped working for some reason.

Installing C# dependencies... Platform: darwin, x86_64

Downloading package ‘Razor Language Server (macOS / x64)’ (57227 KB)… Done! Installing package ‘Razor Language Server (macOS / x64)’

Finished

Environment information

VSCode version: 1.34.0 C# Extension: 1.19.1

Mono Information OmniSharp using global mono :5.20.1
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 2.2.204 Commit: 8757db13ec

Runtime Environment: OS Name: Mac OS X OS Version: 10.14 OS Platform: Darwin RID: osx.10.14-x64 Base Path: /usr/local/dotnet/sdk/2.2.204/

Host (useful for support): Version: 2.2.5 Commit: 0a3c9209c0

.NET Core SDKs installed: 2.1.507 [/usr/local/dotnet/sdk] 2.1.604 [/usr/local/dotnet/sdk] 2.2.107 [/usr/local/dotnet/sdk] 2.2.204 [/usr/local/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.11 [/usr/local/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.5 [/usr/local/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.11 [/usr/local/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.5 [/usr/local/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.11 [/usr/local/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.5 [/usr/local/dotnet/shared/Microsoft.NETCore.App]

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

Visual Studio Code Extensions
Extension Author Version
ariake-dark wart 0.2.2
backspace-plusplus jrieken 0.0.17
bettergitcommits davidedmiston 0.5.0
csharp ms-vscode 1.19.1
debugger-for-chrome msjsdiag 4.11.3
EditorConfig EditorConfig 0.13.0
embrace mycelo 1.0.0
Ionide-fsharp Ionide 3.38.0
Ionide-Paket Ionide 1.12.0
leaper OnlyLys 0.5.3
mono-debug ms-vscode 0.15.8
msbuild-project-tools tintoy 0.2.54
nord-visual-studio-code arcticicestudio 0.8.0
path-intellisense christian-kohler 1.4.2
rewrap stkb 1.9.1
spaces-inside-braces AiryShift 0.4.0
subtle-brackets rafamel 3.0.0
theme-light-vs-mac jamiewest 0.4.5
vscode-cil-complete wk-j 0.0.5
vscode-icon-theme jtlowe 1.6.5
vscode-subword-navigation ow 1.1.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dancojocaru2000commented, Jun 1, 2020

Aaaaand it happened again.

Waiting for 2 minutes (and counting) to debug a Python script really feels unacceptable.

1reaction
kwikwagcommented, Feb 9, 2021

This is a blocking feature for me and will cause an uninstall of the extension. Together with https://github.com/OmniSharp/omnisharp-vscode/issues/3862 this is extremely annoying. There should be no blocking network communication in performing an action in VS code because of an extension. One can run this in the background the have launch.json include C# templates only when completed (together with a notification that this is happening).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure launch.json for C/C++ debugging in Visual Studio ...
Visual Studio Code generates a launch.json (under a .vscode folder in your project) with almost all of the required information.
Read more >
The launch.json file for the DevTools extension - Microsoft Learn
The launch.json file for the Microsoft Edge DevTools extension for Visual Studio Code, for advanced customization of debug configurations.
Read more >
How to Develop an ASP.NET Core Application Using Visual ...
This blog serves as a complete guide to develop, deploy, and test ASP.NET Core applications using Visual Studio Code, which is a free ......
Read more >
Visual Studio Code for .Net Framework - Stack Overflow
vscode with launch.json and tasks.json . b. bin\Debug folder for your .exe application and the assemblies you might want to ...
Read more >
How YOU can get started with .NET Core and C# in VS Code
Add a test project and run our tests; Add a Console program and use our library; Improve our IDE with vscode-solution-explorer extension. what...
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