Skip to content

vscode launch file absolute path workaround? #697

Closed
@adamfk

Description

@adamfk

dotnet-script is really, really cool! The only (minor) problem for me is the fixed file path in the .vscode/launch.json file.

Is there any chance that the vscode dotnet script launch configuration could be improved to not use a user specific absolute path?

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Script Debug",
            "type": "coreclr",
            "request": "launch",
            "program": "dotnet",
            "args": [
                "exec",
                "C:/Users/my_username/.dotnet/tools/.store/dotnet-script/1.4.0/dotnet-script/1.4.0/tools/net6.0/any/dotnet-script.dll",
                "${file}"
            ],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": false
        }
    ]
}

I often share .vscode/launch.json files (with multiple configurations) for tutorials. It would be really helpful if the person downloading the tutorial could just run it (like a standard c# project) without having to adjust the launch file. The user can't run dotnet script init to set the path correctly because there is an existing launch file.

I spent a while trying to get around this by using vscode variable references, but I think the best I would be able to do is create a custom vscode extension that would just return the correct dotnet script path.

Maybe the dotnet command could be improved in the future to know the path to dotnet-script.dll?

Any other ideas?

Thanks! c# script files are pretty awesome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy