Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98783

VS Code Workspace launch configuration section does not work

$
0
0

My VS Code Workspace file includes a launch configuration and tasks section, so a developer can run the Azure Functions local.

But it seams that the launch configuration from workspace file will be ignored.

If i add launch.json and tasks.json with the same content, it works without any problems.

.code-workspace:

{
    "folders": [
        {
            "path": "."
        }
    ],
    "launch": {
        "configurations": [
            {
                "name": "Attach to .NET Functions",
                "type": "coreclr",
                "request": "attach",
                "processId": "${command:azureFunctions.pickProcess}"
            }
        ]
    },
    "tasks": {
        "version": "2.0.0",
        "tasks": [
            {
                "label": "clean",
                "command": "dotnet",
                "args": [
                    "clean",
                    "/property:GenerateFullPaths=true",
                    "/consoleloggerparameters:NoSummary"
                ],
                "type": "process",
                "problemMatcher": "$msCompile"
            },
            {
                "label": "build",
                "command": "dotnet",
                "args": [
                    "build",
                    "/property:GenerateFullPaths=true",
                    "/consoleloggerparameters:NoSummary"
                ],
                "type": "process",
                "dependsOn": "clean",
                "group": {
                    "kind": "build",
                    "isDefault": true
                },
                "problemMatcher": "$msCompile"
            },
            {
                "label": "clean release",
                "command": "dotnet",
                "args": [
                    "clean",
                    "--configuration",
                    "Release",
                    "/property:GenerateFullPaths=true",
                    "/consoleloggerparameters:NoSummary"
                ],
                "type": "process",
                "problemMatcher": "$msCompile"
            },
            {
                "label": "publish",
                "command": "dotnet",
                "args": [
                    "publish",
                    "--configuration",
                    "Release",
                    "/property:GenerateFullPaths=true",
                    "/consoleloggerparameters:NoSummary"
                ],
                "type": "process",
                "dependsOn": "clean release",
                "problemMatcher": "$msCompile"
            },
            {
                "type": "func",
                "dependsOn": "build",
                "options": {
                    "cwd": "${workspaceFolder}/src/ProjectAbc/bin/Debug/netcoreapp2.2"
                },
                "command": "host start",
                "isBackground": true,
                "problemMatcher": "$func-watch"
            }
        ]
    }
}

Expected Behavior: If i press F5 the lauch configuration from workspace settings should be used to build and run the Azure functions.

Actual Behavior: If i press F5 VS Code want to create a launch.json file based on an environment.

enter image description here


Viewing all articles
Browse latest Browse all 98783

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>