runtime icon indicating copy to clipboard operation
runtime copied to clipboard

WARNING: The target process exited without raising a CoreCLR started event.

Open dutts opened this issue 10 years ago • 32 comments

Following the instructions on https://dotnet.github.io/getting-started/ for OS X and loading the sample Hello World application in Visual Studio Code, if I attempt to debug I see Hello World! in the output but also get the following warning:

WARNING: The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use NETStandard 1.0.0-rc3-23829 or newer. This may be expected if the target process did not run .NET code.

dutts avatar Apr 28 '16 22:04 dutts

Hi @dutts, which version do you have installed? Can you please try installing the latest version of dotnet/cli from https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-dev-osx-x64.latest.pkg?

@Petermarcu, https://dotnet.github.io/getting-started/ for OS X seems to point to a very old version of the dotnet tools. Any reason why it has not been updated?

sergiy-k avatar Apr 28 '16 23:04 sergiy-k

@sergiy-k The link you've given install SDK version 1.0.0-rc2-002673 . Where can I get 1.0.0-rc3-23829 from?

amarinov avatar May 05 '16 15:05 amarinov

Yeah, the versioning is a bit confusing. The RC2 version that you posted is actually the version of the dotnet cli tools (it is not the version of CoreCLR).

Please note that the version of CoreCLR from the warning message (1.0.0-rc3-23829) corresponds to a build from the master branch on Feb 29. The link that I gave you installs the latest build of CoreCLR from the RC2 (release/1.0.0-rc2) branch. This what we will ship soon as you can see from this blog: https://blogs.msdn.microsoft.com/dotnet/2016/05/06/net-core-rc2-improvements-schedule-and-roadmap/

sergiy-k avatar May 07 '16 01:05 sergiy-k

Please let me know if you still have this problem after upgrading to the released RC2 build. Closing the issue for now.

sergiy-k avatar Jun 08 '16 16:06 sergiy-k

@sergiy-k I just recently downloaded the latest build (1.0.0-preview2-003131) and I still end up getting that message when executing Hello World! application

ppatel26 avatar Oct 10 '16 10:10 ppatel26

@mikem8361, could you please take a look?

sergiy-k avatar Oct 10 '16 23:10 sergiy-k

@gregg-miskelly @caslan does this look like a versioning problem with dbgshim or the bug we found and fixed in dbgshim?

mikem8361 avatar Oct 18 '16 16:10 mikem8361

Is the app targeting full framework? If so, the app would launch and then you would see that error.

caslan avatar Oct 18 '16 16:10 caslan

@ppatel26 can you tell us more about your scenario?

The most common known reasons for this are:

  1. As Charlie said, on Windows, trying to debug a full framework app
  2. Trying to debug a process where the interesting code is in a child process. dotnet run in the most common case like this.

gregg-miskelly avatar Oct 18 '16 20:10 gregg-miskelly

@gregg-miskelly @caslan @sergiy-k @mikem8361 Here are some screenshots. I am using a Mac OS X (10.9.5)

screen shot 2016-10-18 at 2 46 03 pm

When I do the run from the terminal. I don't end up getting the warning. It shows up after the debug run from Visual Studio Code.

screen shot 2016-10-18 at 2 46 07 pm

ppatel26 avatar Oct 18 '16 21:10 ppatel26

@ppatel26 what does your launch.json look like?

gregg-miskelly avatar Oct 18 '16 22:10 gregg-miskelly

@gregg-miskelly Here yo go.

screen shot 2016-10-18 at 3 14 32 pm

ppatel26 avatar Oct 18 '16 22:10 ppatel26

Three questions:

  1. What version of the .NET Core Shared Framework do you have installed? You can run dotnet in terminal to see. (see below for an example)
  2. What version of the VS Code C# extension do you have installed? You can see this in the extensions pan in VS Code.
  3. Can you test if vmmap is working for you (see below for instructions).

Example output from dotnet:

MAC:~/cliver> dotnet

Microsoft .NET Core Shared Framework Host

  Version  : 1.0.1
  Build    : cee57bf6c981237d80aa1631cfe83cb9ba329f12

Testing vmmap:

  1. Open a C# source file in vscode
  2. Find the OmniSharp process id (ps -A | grep OmniSharp)
  3. See if vmmap can tell you the path to libcoreclr.dylib (vmmap <pid> | grep coreclr.dylib | head -1)

Example:

MAC:~/cliver> ps -A | grep OmniSharp | head -1
16508 ??         0:13.76 /Users/greggm/.vscode/extensions/ms-vscode.csharp-1.3.0/out/.omnisharp-coreclr/OmniSharp -s /Users/greggm/cliver --hostPID 16494 DotNet:enablePackageRestore=false --stdio
MAC:~/cliver> vmmap 16508 | grep coreclr.dylib | head -1
__TEXT                 0000000100824000-0000000100bc0000 [ 3696K] r-x/rwx SM=COW  /Users/greggm/.vscode/extensions/ms-vscode.csharp-1.3.0/out/.omnisharp-coreclr/libcoreclr.dylib

gregg-miskelly avatar Oct 18 '16 23:10 gregg-miskelly

@gregg-miskelly

  1. .NET Core version 1.0.1 screen shot 2016-10-18 at 8 51 24 pm

  2. VS Code C# extension version 1.4.1

  3. vmmap test

parvs-mbp:~ parvpatel$ ps -A | grep OmniSharp
  503 ??         0:07.68 /Users/parvpatel/.vscode/extensions/ms-vscode.csharp-1.4.1/out/.omnisharp-coreclr/OmniSharp -s /Users/parvpatel/Desktop/Programming Projects/CSharp Projects/testhw --hostPID 478 DotNet:enablePackageRestore=false --encoding utf-8 --stdio
  526 ttys000    0:00.00 grep OmniSharp
parvs-mbp:~ parvpatel$ vmmap 503 | grep coreclr.dylib | head -1
__TEXT                 000000010c655000-000000010c9f1000 [ 3696K] r-x/rwx SM=COW  /Users/parvpatel/.vscode/extensions/ms-vscode.csharp-1.4.1/out/.omnisharp-coreclr/libcoreclr.dylib

ppatel26 avatar Oct 19 '16 04:10 ppatel26

@ppatel26 that all looks reasonable. @mikem8361 any other guesses? Anything @ppatel26 can do to troubleshoot this?

gregg-miskelly avatar Oct 19 '16 04:10 gregg-miskelly

I’ll try to repro locally on my Windows dev machine.

mikem8361 avatar Oct 19 '16 17:10 mikem8361

@mikem8361 this is just debugging hello world, so its not going to be something you will be able to repro locally. There must be something configured differently on ppatel26's macOS box that breaks dbgshim.

gregg-miskelly avatar Oct 19 '16 17:10 gregg-miskelly

Oops. For some reason I thought this was on Windows.

I'm not sure what to do now.

mikem8361 avatar Oct 19 '16 18:10 mikem8361

Can @ppatel26 check for the existence of semaphores and/or check if they can be successfully created? Would it make sense to provide a private dbgshim with some logging?

gregg-miskelly avatar Oct 19 '16 18:10 gregg-miskelly

There is some logging that can be enabled in a debug build. Not sure how to get a debug dbgshim.dylib to ppatel26. On OS X, the semaphores used in the handshake are not visible from the file system like they are in Linux.

mikem8361 avatar Oct 19 '16 19:10 mikem8361