runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Debug on Docker throws an error

Open cilerler opened this issue 10 years ago • 5 comments

I just created simple DotNetCore WebApi and added Docker support through Visual Studio 2015 Update 3 (as latest as it can be). Ran the debug on docker and following error occurred when I tried to debug it on docker.

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use Microsoft.NETCoreApp 1.0.0 or newer. This may be expected if the target process did not run .NET code.

Any idea how to fix this issue?

Side notes

  • Latest SDK is installed so message in Debug output doesn't make sense
  • Latest VS205 Tools for Docker Preview is installed
  • Based on http://stackoverflow.com/questions/37446873/visual-studio-2015-docker-integration-wont-attach-for-debuging drive C is checked under the Shared Drives of Docker Settings
  • GitHub Issue 4657 does not help.

Dockerfile.debug

FROM microsoft/dotnet:1.0.0-core

Debug output

VERBOSE: Setting: $env:CLRDBG_VERSION = "VS2015U2"
VERBOSE: Setting: $env:REMOTE_DEBUGGING = 0
VERBOSE: Executing: docker exec -i 64495b0eae7c /clrdbg/clrdbg --interpreter=mi
Did you mean to run dotnet SDK commands? Please install dotnet SDK from: 
  http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
The program '' has exited with code 145 (0x91).

Docker output

C:\Users\kal-el\Documents\Visual` Studio` 2015\Projects\Krypton\src\Krypton\DockerTask.ps1 -Run -Environment Debug -Machine '' -RemoteDebugging $True -OpenSite $False
VERBOSE: Setting: $env:CLRDBG_VERSION = "VS2015U2"
VERBOSE: Setting: $env:REMOTE_DEBUGGING = 1
VERBOSE: Executing: docker-compose -f 'C:\Users\kal-el\Documents\Visual Studio 
2015\Projects\Krypton\src\Krypton\bin\Docker\Debug\app\docker-compose.Debug.yml' -p krypton up -d
Recreating krypton_krypton_1
C:\Users\kal-el\Documents\Visual` Studio` 2015\Projects\Krypton\src\Krypton\DockerTask.ps1 -WaitForUrl -Machine ''
VERBOSE: Setting: $env:CLRDBG_VERSION = "VS2015U2"
VERBOSE: Setting: $env:REMOTE_DEBUGGING = 0
Opening site http://docker ........................................................................................................................
Validating volume mapping in the container 64495b0eae7c
ValidateVolumeMapping : Unable to validate volume mapping. For troubleshooting, follow instructions from 
http://aka.ms/DockerToolsTroubleshooting
At C:\Users\kal-el\Documents\Visual Studio 2015\Projects\Krypton\src\Krypton\DockerTask.ps1:352 char:9
+         ValidateVolumeMapping
+         ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ValidateVolumeMapping

Original question posted on StackOverflow

cilerler avatar Jul 26 '16 14:07 cilerler

See @dbreshears's answer to @m0n0ph0n in Q and A section of extension page: https://visualstudiogallery.msdn.microsoft.com/0f5b2caa-ea00-41c8-b8a2-058c7da0b3e4/view/Discussions.

It is the casing issue in docker: https://github.com/docker/docker/issues/24348#issuecomment-230834106., which hopefully will be fixed.

ghost avatar Jul 27 '16 21:07 ghost

Upgrading Docker Tools for Visual Studio 2015 - Preview to v0.31.0 fixes the issue..

Thanks @jasonwilliams200OK Like many others I received the new version notification earlier but it wasn't available to download until last night. Thank you again...

cilerler avatar Jul 27 '16 22:07 cilerler

I have the same issue even with v.0.31.0

MaherJendoubi avatar Sep 03 '16 17:09 MaherJendoubi

Failed to run the command: "DockerTask.ps1 -Run -Environment Debug -Machine '' -RemoteDebugging $True -OpenSite $False".

MaherJendoubi avatar Sep 03 '16 17:09 MaherJendoubi

docker for windows and Microsoft.PowerShell.Commands.WriteErrorException,ValidateVolumeMapping: in my case solution was: Docker -> Settings -> Shared Drivers and mark proper drive as shared.

siudeks avatar Sep 10 '16 13:09 siudeks