You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a C# developer, I often need to debug console applications that take input arguments. However, the current Visual Studio Code documentation does not provide clear guidance on how to set up debugging for such applications.
When I attempt to debug a C# console application with arguments, the dynamically generated debug configuration doesn’t support providing arguments and also doesn't actually save any launch.json files in my VSCode workspace. After some trial and error, I discovered that the command ".NET: Generate Assets for Build and Debug" that actually adds the launch.json configuration, which I could then modify to include command line arguments.
Request:
I would like to request that the documentation be updated to include instructions for debugging C# console applications with input arguments. This should ideally cover:
How to use the ".NET: Generate assets for debugging" command to create the necessary launch.json configuration.
How to modify the generated launch.json to specify input arguments for the application.
Adding this information would help other developers who face similar challenges and make the process of debugging C# applications in Visual Studio Code more straightforward.
@asilverman are you using C# Dev Kit? If so, the out-of-the-box debugging (just F5) will run your console app in the terminal and you can interact with it right there in the terminal. No launch.json needed, no special configuration or any other assets. It should just work.
@webreidi - I am using C# devkit, the program I am looking to debug requires an input argument, the 'dynamically generated debug context' doesn't allow me to specify the argument and this is the problem I needed solved for which I found a workaround.
Running a program in debug with command line arguments is a very common thing and so what I am asking here is that it's made simple and for it to be documented for the benefit of the community.
In other words, to debug my program (console application) I must specify an input. The c# devkit f5 doesn't support any way to configure this input, this should be fixed
As a C# developer, I often need to debug console applications that take input arguments. However, the current Visual Studio Code documentation does not provide clear guidance on how to set up debugging for such applications.
When I attempt to debug a C# console application with arguments, the dynamically generated debug configuration doesn’t support providing arguments and also doesn't actually save any
launch.json
files in my VSCode workspace. After some trial and error, I discovered that the command ".NET: Generate Assets for Build and Debug" that actually adds thelaunch.json
configuration, which I could then modify to include command line arguments.Request:
I would like to request that the documentation be updated to include instructions for debugging C# console applications with input arguments. This should ideally cover:
launch.json
configuration.launch.json
to specify input arguments for the application.Adding this information would help other developers who face similar challenges and make the process of debugging C# applications in Visual Studio Code more straightforward.
Relevant Documentation Page:
Please update this information on the Visual Studio Code documentation page for C# debugging.
Thank you for considering this improvement!
The text was updated successfully, but these errors were encountered: