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.

Hi VS Code PM here 👋

I just followed this tutorial to setup a simple C# app and to debug it. Here’s my feedback on what I think we could improve:

  1. C# should consider contributing to the Editor title area menu, such that a Play button would appear in the Editor Title area. Example how to do this
  2. You ask the user via a notification that “things are missing to run and debug…” and your intention is to automatically create a launch.json. This helps the flow, but is out of the context, since user did not even trigger debugging. Instead of this I suggest that your extension simply provides a dynamic resolveDebugConfiguartion that will provide a launch configuration on the fly. Example. That way you can generate the config when it is needed, and in memory. Alternatively: if you really want to write into launch.json you should do it when the user starts debugging I think.
  3. If the user does not see the notification it is impossible to debug since you are not resolving debug configurations on the fly
  4. If I have a purple no folder VS Code it is impossible to debug a simple C# file
  5. Consider contributing to an Empty debug view to make C# debug setup easier (C++ does this for example)

I would love if we could improve this experience, since we see in user studies that users want a confirmation that VS Code can do C#, and providing an easy way to run and debug simple C# files would be great for this.

Let me know if I can help somehow. I am also open to a quick 30 min meeting where we can discuss about the new cool VS Code debug features that C# could potentially adopt and you could let us know what are your biggest ask for the VS Code debugger.

fyi @gregg-miskelly @weinand

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
WardenGnawcommented, Oct 7, 2021

I am not aware of any way to make that make that a smooth experience today. Today, I would highly recommend instead starting with an empty folder and using dotnet new.

The omnisharp-vscode extension can contribute a walkthrough similar to vscode-cpptools.

This is what you see with VS Code with no folder open. image

This way we can get users who have the C# extension installed to open VS Code in a folder and execute dotnet new with a selection dialog of the choices.

Common templates are:
Template Name         Short Name    Language    Tags
--------------------  ------------  ----------  -------------------
ASP.NET Core Web App  webapp,razor  [C#]        Web/MVC/Razor Pages
Blazor Server App     blazorserver  [C#]        Web/Blazor
Class Library         classlib      [C#],F#,VB  Common/Library
Console App           console       [C#],F#,VB  Common/Console
Windows Forms App     winforms      [C#],VB     Common/WinForms
WPF Application       wpf           [C#],VB     Common/WPF

Here is a view of the (C++) walkthrough: image

1reaction
weinandcommented, Oct 7, 2021

@WardenGnaw you said:

So it is not that feasible to just open a file with an extension .cs and debug it. It heavily depends on the user going through the dotnet new <project-type> that will create the project directory for them and open that folder in VS Code.

But when a user has a .cs file open in an editor and presses the editor’s Run/Debug button, it would be possible to detect the missing .net project setup and present a QuickPick with some dotnet new <project-type> suggestions. And after a selection is made by the user, VS Code could reopen the newly create folder and run the file, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simplify debugging to reduce the complexity of embedded ...
Debugging embedded systems is getting more complex than ever. Thankfully, there are some practical ways to simplify the process.
Read more >
Simplified Debug screen : r/minecraftsuggestions - Reddit
Simplified Debug screen · The version of the game · The player's coordinate · Biome · Light level · Weather · The direction...
Read more >
SIMPLified 2 - Debugging Entitlement - Ultamation Shop
The SIMPLified 2 Debugging entitlement enables all of the SIMPL debugging related functionality of the SIMPLified 2 SIMPL programming assistant.
Read more >
Simplify debug · Issue #983 · vscode-kubernetes-tools/vscode ...
Hi VS Code PM here We would love if Kubernetes debug would simplify debugging as much as possible. Currently I see that users...
Read more >
If You Aren't Doing These 3 Things You Are Making ... - YouTube
Shorts. If You Aren't Doing These 3 Things You Are Making Debugging Harder. 47K views 8 months ago Shorts · Web Dev Simplified....
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