# Attach to process .net core azure function runtime

**URL:** https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552
**Category:** Fire
**Created:** [April 16, 2022, 3:03am UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552 "2022-04-16T03:03:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 16, 2022, 3:03am UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/1 "2022-04-16T03:03:36Z")

</div>

Hi,  
Im trying to attach to the azure function runtime which is running my console app. When its trying to attach I see

```auto
~> Attached to func.
~> The process failed to start with the following error: System.Exception: Could not find the .NET Core dbgshim library at /usr/local/share/dotnet/shared/Microsoft.NETCore.App/6.0.3
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.DotNetCorUtilities.GetInfo (System.String aPath) [0x0003e] in <0bd7c041af3e46cebf0d4165a9e2641b>:0 
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.DotNetCorUtilities.AttachProcess (System.String aDotNetPath, System.UInt32 pPid, System.Action`2[T1,T2] aCallback) [0x00014] in <0bd7c041af3e46cebf0d4165a9e2641b>:0 
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.CLRDebugEngine.Start () [0x00249] in <0bd7c041af3e46cebf0d4165a9e2641b>:0 
~> at a.a (System.String[] a) [0x004c8] in <a7ec39832c3045f0bffb6f92d2e0c579>:0

```

In the debug window.

I see libdbgshim.dylib in that folder, should it be trying to use that ?

Cheers,  
John

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 18, 2022, 12:23pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/2 "2022-04-18T12:23:31Z")

</div>

So `/usr/local/share/dotnet/shared/Microsoft.NETCore.App/6.0.3/libdbgshim.dylib` exists, but is not being used/? is it maybe the wring architecture?

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 19, 2022, 2:08am UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/4 "2022-04-19T02:08:19Z")

</div>

Im running m1 and I only have the arm versions of the sdk and runtime installed. Would the architecture of the azure function runtime make a difference ? I dont know what that is

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 19, 2022, 2:20am UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/5 "2022-04-19T02:20:22Z")

</div>

I also get the same issue with just a regular .net core console app. If I attempt to attach to dotnet it gives the same issue.

Regular debugging works by the way. This is the console app I created to test

[DontStopConsoleApplication.zip](https://talk.remobjects.com/uploads/short-url/g01Crtv8oVzn48nYHilMmdNtNBk.zip) (163.6 KB)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 19, 2022, 12:32pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/6 "2022-04-19T12:32:39Z")

</div>

> [@JohnMoshakis](#):
>
> Would the architecture of the Azure function runtime make a difference ?

Wait, maybe i’m confused as to what you’re actually doing.

> [@JohnMoshakis](#):
>
> I also get the same issue with just a regular .net core console app. If I attempt to attach to dotnet it gives the same issue.
> 
> Regular debugging works by the way. This is the console app I created to test
> 
> [DontStopConsoleApplication.zip](https://talk.remobjects.com/uploads/short-url/g01Crtv8oVzn48nYHilMmdNtNBk.zip) (163.6 KB)

Ah so this is unreated to Azure, realty, it’s just thjatb regular debugging works, but attaching doesn’t?

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 19, 2022, 3:11pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/7 "2022-04-19T15:11:44Z")

</div>

> [@mh](#):
>
> Ah so this is unreated to Azure, realty, it’s just thjatb regular debugging works, but attaching doesn’t?

Yes sorry I realized I made it more complex I should of just created a regular console app and tried attaching to that.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 19, 2022, 3:19pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/8 "2022-04-19T15:19:52Z")

</div>

I’ll have Elena have a look and get back to you.

---

<div class="post-metadata">

### Author: ![elenap](https://talk.remobjects.com/user_avatar/talk.remobjects.com/elenap/32/21512_2.png) [@elenap](https://talk.remobjects.com/u/elenap)
#### Post date: [April 20, 2022, 5:15pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/9 "2022-04-20T17:15:02Z")

</div>

Hello, John!

You could try the new build uploaded for you. The issue is fixed.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 20, 2022, 5:21pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/10 "2022-04-20T17:21:44Z")

</div>

I started a new build with Water, jic.

> [@elenap](#):
>
> You could try the new build uploaded for you. The issue is fixed.

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 20, 2022, 11:58pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/11 "2022-04-20T23:58:21Z")

</div>

Hi,

Thanks. Would this one be ok from Firehose ?

[20220420-144758-fire-develop]

Cheers,  
John

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 21, 2022, 11:57am UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/12 "2022-04-21T11:57:31Z")

</div>

TBH, probably, but not sure. lemme start a new Fire for you just in case.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 21, 2022, 12:45pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/13 "2022-04-21T12:45:33Z")

</div>

> Build for **20220421-115741-fire-develop** succeeded on gazorpazorp, took 37 minutes, 15 seconds. [Files are available here](https://secure.remobjects.com/portal/ci2/builds/?expand=20220421-115741-fire-develop).

should be fine

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 21, 2022, 1:13pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/14 "2022-04-21T13:13:12Z")

</div>

> [@mh](#):
>
> 0220421-115741-fire-dev

It still seems to give the same error

```auto
~> Attached to dotnet.
~> The process failed to start with the following error: System.Exception: Could not find the .NET Core dbgshim library at /usr/local/share/dotnet/shared/Microsoft.NETCore.App/6.0.3
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.DotNetCorUtilities.GetInfo (System.String aPath) [0x0003e] in <0bd7c041af3e46cebf0d4165a9e2641b>:0 
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.DotNetCorUtilities.AttachProcess (System.String aDotNetPath, System.UInt32 pPid, System.Action`2[T1,T2] aCallback) [0x00014] in <0bd7c041af3e46cebf0d4165a9e2641b>:0 
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.CLRDebugEngine.Start () [0x00249] in <0bd7c041af3e46cebf0d4165a9e2641b>:0 
~> at a.a (System.String[] a) [0x004c8] in <a7ec39832c3045f0bffb6f92d2e0c579>:0

```

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 21, 2022, 2:05pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/15 "2022-04-21T14:05:24Z")

</div>

To be safe, you sure you’re not using an external compiler that wasn’t updated to match?

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 21, 2022, 2:08pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/16 "2022-04-21T14:08:18Z")

</div>

I turned off the external compiler but didnt update it, should I have updated it ?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 21, 2022, 2:37pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/17 "2022-04-21T14:37:11Z")

</div>

No. if you used external, you’d have to update it to see the fix. if you are not, then you should be fine.

---

<div class="post-metadata">

### Author: ![JohnMoshakis](https://talk.remobjects.com/user_avatar/talk.remobjects.com/johnmoshakis/32/2286_2.png) [@JohnMoshakis](https://talk.remobjects.com/u/JohnMoshakis)
#### Post date: [April 21, 2022, 3:05pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/18 "2022-04-21T15:05:32Z")

</div>

I tried with the latest external and that also appears to not work.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 21, 2022, 4:34pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/19 "2022-04-21T16:34:50Z")

</div>

Ok, thanx. Looks like @elenap has more work to do on this 😉

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 21, 2022, 5:42pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/20 "2022-04-21T17:42:01Z")

</div>

Do you have the arm64 or x86\_64 version of .NET Core installed?

i just retested here; i see Elena’s fix working, but it styill fails due toa versy similar error

```auto
~> Attached to dotnet.
~> The process failed to start with the following error: System.Exception: Could not load .the NET Core dbgshim library at /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.3.22175.4/libdbgshim.dylib. Error: dlopen(/usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.3.22175.4/libdbgshim.dylib, 0x0102): tried: '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.3.22175.4/libdbgshim.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.DotNetCorUtilities.LoadLibrary (System.String s) [0x0005c] in <f97ba959aa2b4dc5aac7794ecad7dd02>:0 
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.DotNetCorUtilities.GetInfo (System.String aPath) [0x00044] in <f97ba959aa2b4dc5aac7794ecad7dd02>:0 
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.DotNetCorUtilities.AttachProcess (System.String aDotNetPath, System.UInt32 pPid, System.Action`2[T1,T2] aCallback) [0x00014] in <f97ba959aa2b4dc5aac7794ecad7dd02>:0 
~> at RemObjects.Oxygene.CoreDebugEngine.CLR.CLRDebugEngine.Start () [0x00263] in <f97ba959aa2b4dc5aac7794ecad7dd02>:0 
~> at a.a (System.String[] a) [0x004c8] in <f9baa078cc1940749c28ddb71dfc188d>:0

```

but note that the path includes the .dylib name; id didn;t for you, and that part is what should have been fixed.

```auto
 Could not load .the NET Core dbgshim library at /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.0-preview.3.22175.4/libdbgshim.dylib. 

```

vs

```auto
Could not find the .NET Core dbgshim library at /usr/local/share/dotnet/shared/Microsoft.NETCore.App/6.0.3

```

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 21, 2022, 6:08pm UTC](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552/21 "2022-04-21T18:08:34Z")

</div>

The build started now has this issue fixed; i’d appreciate if you could retest with that one to see if maybe that also takes care of your issue, especially if you are on an arm64 Mac.

[Next page](https://talk.remobjects.com/t/attach-to-process-net-core-azure-function-runtime/26552.md?page=2)
