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

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

Closed
xplicit opened this issue Jul 12, 2017 · 3 comments

Comments

@xplicit
Copy link

xplicit commented Jul 12, 2017

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"
        }
@gregg-miskelly
Copy link
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.

@gregg-miskelly gregg-miskelly 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 Jul 12, 2017
@gregg-miskelly gregg-miskelly added this to the 1.12 milestone Jul 12, 2017
@xplicit
Copy link
Author

xplicit commented Jul 13, 2017

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.

@gregg-miskelly
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants