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

Attach to process fails for project.json SDK #1232

Closed
dmccaffery opened this issue Feb 13, 2017 · 9 comments
Closed

Attach to process fails for project.json SDK #1232

dmccaffery opened this issue Feb 13, 2017 · 9 comments

Comments

@dmccaffery
Copy link

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-1-003182)

Product Information:
Version: 1.0.0-preview2-1-003182
Commit SHA-1 hash: 024c726cdd

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64

VS Code version:

1.9.1 f9d0c687ff2ea7aabd85fb9a43129117c0ecf519

C# Extension version:

1.7.0

Steps to reproduce

Attempt to attach to a any corerun process with a global.json set to 1.0.0-preview2-1-003182.

NOTE: I do have SxS SDKs installed:

1.0.0-preview2-1-003177
1.0.0-preview2-1-003182
1.0.0-preview3-004059
1.0.0-preview4-004233
1.0.0-rc3-004534
1.0.0-rc4-004777

LAUNCH.JSON CONFIG:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command.pickProcess}"
        }
    ]
}

GLOBAL.JSON CONFIG:

{
    "projects": [
        "src",
        "test"
    ],
    "sdk": {
        "version": "1.0.0-preview2-1-003182",
        "runtime": "CoreCLR",
        "architecture": "x64"
    }
}

Expected behavior

Attach should succeed.

This was working before on this exact same project just a week or two ago, so this bug was likely introduced with 1.7.0 of the C# plugin and/or in the clrdbg included with the newer plugin.

I realize that project.json will go away on March 09, but its still the currently 'supported' SDK as of today.

Actual behavior

ERROR: Undefined MI command: logout

screen shot 2017-02-13 at 12 07 00 am

@gregg-miskelly
Copy link
Contributor

@dmccaffery can you enable logging (the quick method should work) and send us the results?

@crazyDiamond
Copy link

crazyDiamond commented Feb 17, 2017

I am having the same issue. See results from quick method logging below. There is an error that says the debug adapter process has terminated unexpectedly.

--------------------------------------------------------------------------------
(272) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
(284) LaunchOptions  ExePath='dotnet'
(284) LaunchOptions  WorkingDirectory='/Projects/patient-registry'
(284) LaunchOptions  ExeArguments='/Projects/patient-registry/src/PatientRegistry.Web/bin/Debug/netcoreapp1.1/PatientRegistry.Web.dll'
(284) LaunchOptions  MIDebuggerPath='/Users/-/.vscode/extensions/ms-vscode.csharp-1.7.0/.debugger/clrdbg'
(284) LaunchOptions  MIMode='clrdbg'
 (284) LaunchOptions>
 (284) LaunchOptions    <Environment>
 (284) LaunchOptions        <EnvironmentEntry Name='ASPNETCORE_ENVIRONMENT' Value='Development' />
 (284) LaunchOptions    </Environment>
1: (284) LaunchOptions</LocalLaunchOptions>
1: (373) Starting: "/Users/-/.vscode/extensions/ms-vscode.csharp-1.7.0/.debugger/clrdbg" --interpreter=mi
1: (383) DebuggerPid=82938
1: (386) > ->=message,text="--------------------------------------------------------------------------------\nYou
 may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio\nCode, Visual Studio or Visual Studio for Mac software to help you develop and\ntest your applications.\n--------------------------------------------------------------------------------\n",send-to="output-window"
1: (387) ->(gdb)
E output: {"category":"console","output":"--------------------------------------------------------------------------------\nYou may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio\nCod
1: (387) ->(gdb)
E output: {"category":"console","output":"--------------------------------------------------------------------------------\nYou may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio\nCode, Visual Studio or Visual Studio for Mac software to help you develop and\ntest your applications.\n--------------------------------------------------------------------------------\n","data":null,"type":"output"}
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
1: (431) <-1001-environment-cd /Users/-/Projects/patient-registry
1: (432) ->1001^done
1: (432) ->(gdb)
1: (434) 1001: elapsed time 2
1: (436) <-1002-gdb-set client-version "14.0.31028.1"
1: (436) ->1002^done
1: (436) ->(gdb)
1: (436) 1002: elapsed time 0
1: (436) <-1003-gdb-set client-ui "VSCode"
1: (436) ->1003^done
1: (436) ->(gdb)
1: (436) 1003: elapsed time 0
1: (436) <-1004-file-exec-and-symbols dotnet
1: (436) ->1004^error,msg="The filename, directory name, or volume label syntax is incorrect."
1: (436) 1004: elapsed time 0
1: (437) ->(gdb)
1: (442) <-logout
1: (442) ->^error,msg="Undefined MI command: logout"
1: (442) ->(gdb)
E output: {"category":"stderr","output":"ERROR: Undefined MI command: logout\n","data":null,"type":"output"}
ERROR: Undefined MI command: logout
1: (445) <--gdb-exit
 R: {"success":false,"message":"Unable to start debugging. Program path 'dotnet' is missing or invalid.\r\n\r\nCLRDBG failed with message: The filename, directory name, or volume label syntax is incorrect.","request_seq":2,"command":"launch","body":{"error":{"id":1104,"format":"Unable to start debugging. Program path 'dotnet' is missing or invalid.\r\n\r\nCLRDBG failed with message: The filename, directory name, or volume label syntax is incorrect.","variables":null}},"running":false,"refs":null,"seq":0,"type":"response"}
C disconnect: {"restart":false}
 R: {"success":true,"message":null,"request_seq":3,"command":"disconnect","body":null,"running":false,"refs":null,"seq":0,"type":"response"}

@rajkumar42
Copy link
Contributor

@crazyDiamond, is "dotnet" in the path? You can verify that by 'which dotnet' or 'dotnet --info' on your shell?

@crazyDiamond
Copy link

I'm able to run the program from console using and am running into the same problem as @dmccaffery when trying to debug. @rajkumar42 which path do you think dotnet is missing from?

@dmccaffery
Copy link
Author

@rajkumar42 dotnet is indeed on my path. That being said; I have multiple SDKs installed and am redirecting to the msbuild SDK in this instance using global.json, which only allows a single value these days (the sdk value).

@dmccaffery
Copy link
Author

screen shot 2017-03-07 at 4 19 03 am

@gregg-miskelly
Copy link
Contributor

gregg-miskelly commented Mar 7, 2017

@dmccaffery when you look at your log do you also see? --

.... -file-exec-and-symbols dotnet
.... ^error,msg="The filename, directory name, or volume label syntax is incorrect."

@crazyDiamond what OS are you on? Can you send me the value for your PATH variable? What does which dotnet return?

@dmccaffery
Copy link
Author

@gregg-miskelly it is now working against the 1.0.1 SDK, weird, eh?

@gregg-miskelly
Copy link
Contributor

Yup. But I will not complain :). @crazyDiamond please open a new issue if you are running into this still.

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

4 participants