簡體   English   中英

調試程序 Visual Studio Code 的問題

[英]Problem with debug program Visual Studio Code

如果我想調試我的程序,我會看到這個錯誤:

在此處輸入圖像描述

我的 Json 文件:

{
    // Use IntelliSense to find out which attributes exist for C# debugging
    // Use hover for the description of the existing attributes
    // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/DatingApp.API/bin/Debug/netcoreapp2.2/DatingApp.API.dll",
            "args": [],
            "cwd": "${workspaceFolder}/DatingApp.API",
            "stopAtEntry": false,
            "internalConsoleOptions": "openOnSessionStart",
            // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
            "serverReadyAction": {
                "action": "openExternally",
                "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
            },
            "env": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "sourceFileMap": {
                "/Views": "${workspaceFolder}/Views"
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
     ]
 }

當我看到這個錯誤時,我選擇 Visual Studio Code.Net Core Launch Web。 我不知道問題出在哪里,也許與 launch.json 文件有關。

如果您使用的是 Windows,則路徑必須包含反斜杠,如果您使用的是任何類 UNIX 系統,則必須在路徑中使用正常的斜杠。 希望這有所幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM