Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging failed as unable to generate "launch.json" in VSCode. #4346

Closed
dandanmu opened this issue Jan 15, 2021 · 0 comments · Fixed by #4349
Closed

Debugging failed as unable to generate "launch.json" in VSCode. #4346

dandanmu opened this issue Jan 15, 2021 · 0 comments · Fixed by #4349

Comments

@dandanmu
Copy link
Member

Environment data

dotnet --info output:
.NET SDK (reflecting any global.json):
Version: 6.0.100-alpha.1.21064.46
Commit: 76b9d0ff50

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100-alpha.1.21064.46\

Host (useful for support):
Version: 6.0.0-alpha.1.21063.13
Commit: 6ded57b3d2

.NET SDKs installed:
6.0.100-alpha.1.21064.46 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0-alpha.1.21063.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0-alpha.1.21063.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.0-alpha.1.21063.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

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

VS Code version:1.52.1
C# Extension version:1.23.8

Steps to reproduce

• Create new .NET 6.0 console application(con60) with reference to a .NET Standard 2.1 class library(cla21) via CLI,
• Open it via VSCode
• Debug the app – Put breakpoint in the code and press F5
image

Expected behavior

Debug could succeed.

Actual behavior

• It shows a prompt message that “Could not find the task 'build'”
image
• Then open “launch.json”, press “Add Configuration…”, and the "launch.json" file generated with warning:
"WARNING01": "",
"WARNING02": "The C# extension was unable to automatically decode projects in the current",
"WARNING03": "workspace to create a runnable launch.json file. A template launch.json file has",
"WARNING04": "been created as a placeholder.",
"WARNING05": "",
"WARNING06": "If OmniSharp is currently unable to load your project, you can attempt to resolve",
"WARNING07": "this by restoring any missing project dependencies (example: run 'dotnet restore')",
"WARNING08": "and by fixing any reported errors from building the projects in your workspace.",
"WARNING09": "If this allows OmniSharp to now load your project then --",
"WARNING10": " * Delete this file",
"WARNING11": " * Open the Visual Studio Code command palette (View->Command Palette)",
"WARNING12": " * run the command: '.NET: Generate Assets for Build and Debug'.",
"WARNING13": "",
"WARNING14": "If your project requires a more complex launch configuration, you may wish to delete",
"WARNING15": "this configuration and pick a different template using the 'Add Configuration...'",
"WARNING16": "button at the bottom of this file.",
"WARNING17": "
",
image

@dandanmu dandanmu changed the title Debugging failed that create "launch.json" with warning in VSCode. Debugging failed that generate "launch.json" with warning in VSCode. Jan 15, 2021
@dandanmu dandanmu changed the title Debugging failed that generate "launch.json" with warning in VSCode. Debugging failed as unable to generate "launch.json" in VSCode. Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant