Skip to content

Debugger doesn't provide nice error message when 'program' is set to a path that doesn't exist #1634

Closed

Description

@xplicit

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
 Version:            2.0.0-preview1-005977
 Commit SHA-1 hash:  414cab8a0b

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /usr/share/dotnet/sdk/2.0.0-preview1-005977/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview1-002111-00
  Build    : 1ff021936263d492539399688f46fd3827169983

VS Code version: 1.13.1
C# Extension version: 1.11.0

Steps to reproduce

When I hit F5 with following config I get an error

No executable found matching command "dotnet-/home/sergey/Projects/ServiceStack/netcore/ServiceStack.Azure/bin/Debug/netcoreapp1.1/ServiceStack.Azure.Tests.dll

it adds prefix dotnet- to all commands and of course it can't find it. So debuging does not work in the latest version, in previous version I did not notice any issues with debugging.

        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/ServiceStack.Azure.Tests.dll",
            "args": [],
            "cwd": "${workspaceRoot}/tests/ServiceStack.Azure.Tests",
            "stopAtEntry": false,
            "console": "internalConsole"
        }

Activity

  1. gregg-miskelly commented on Jul 12, 2017

    @gregg-miskelly
    Contributor

    I noticed that you have the .NET Core preview2 installed, but your program value is targeting netcoreapp1.1. Is that right?

    I believe the problem here is that your program path is wrong (for this reason or something else), and it looks like the debugger is missing a better error message when this happens.

  2. changed the title [-]Can not run application in debug mode[/-] [+]Debugger doesn't provide nice error message when 'program' is set to a path that doesn't exist[/+] on Jul 12, 2017
  3. added this to the 1.12 milestone on Jul 12, 2017
  4. xplicit commented on Jul 13, 2017

    @xplicit
    Author

    You're right, it was path issue. The message "file not found" without dotnet- prefix and with full path will be a good solution for this issue.

  5. gregg-miskelly commented on Jul 13, 2017

    @gregg-miskelly
    Contributor

    Thanks for confirming. We should have a better experience in the next version.

  6. added
    fixed
    on Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Debuggerfixed

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions