You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-7Lines changed: 22 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,9 @@
1
1
# Azure Functions .NET Isolated
2
2
3
-
Welcome to a preview of .NET Isolated in Azure Functions. .NET Isolated provides .NET 5 support in Azure Functions. It runs in an out-of-process language worker that is separate from the Azure Functions runtime. This allows you to have full control over your application's dependencies as well as other new features like a middleware pipeline.
3
+
Welcome to .NET Isolated in Azure Functions. .NET Isolated provides .NET 5 support in Azure Functions. It runs in an out-of-process language worker that is separate from the Azure Functions runtime. This allows you to have full control over your application's dependencies as well as other new features like a middleware pipeline.
4
4
5
5
A .NET Isolated function app works differently than a .NET Core 3.1 function app. For .NET Isolated, you build an executable that imports the .NET Isolated language worker as a NuGet package. Your app includes a [`Program.cs`](FunctionApp/Program.cs) that starts the worker.
6
6
7
-
As this is a preview, there may be some breaking changes to be expected.
8
-
9
7
## Binding Model
10
8
11
9
.NET Isolated introduces a new binding model, slightly different from the binding model exposed in .NET Core 3 Azure Functions. More information can be [found here](https://github.com/Azure/azure-functions-dotnet-worker/wiki/.NET-Worker-bindings). Please review our samples for usage information.
@@ -14,15 +12,13 @@ As this is a preview, there may be some breaking changes to be expected.
14
12
15
13
The Azure Functions .NET Isolated supports middleware registration, following a model similar to what exists in ASP.NET and giving you the ability to inject logic into the invocation pipeline, pre and post function executions.
16
14
17
-
While the full middleware registration set of APIs is not yet exposed, middleware registration is supported and we've added an [example](https://github.com/Azure/azure-functions-dotnet-worker-preview/tree/main/FunctionApp/Middleware) to the sample application under the `Middleware` folder.
18
-
19
15
## Samples
20
16
21
17
The samples for .NET Isolated using various Azure Functions bindings are available under `samples/SampleApp` ([link](https://github.com/Azure/azure-functions-dotnet-worker/tree/main/samples/SampleApp)).
22
18
23
19
## Create and run .NET Isolated functions
24
20
25
-
**Note: VS and VS Code support is on the way. In the meanwhile, please use `azure-functions-core-tools` or the sample projects as a starting point.**
21
+
**Note: Visual Studio and Visual Studio Code support is on the way. In the meantime, please use `azure-functions-core-tools` or the sample projects as a starting point.**
@@ -47,7 +43,26 @@ Run `func host start` in the sample app directory.
47
43
48
44
#### Visual Studio
49
45
50
-
To debug in Visual Studio, add a `Debugger.Launch()` statement in *Program.cs* ([similar to this](https://github.com/Azure/azure-functions-dotnet-worker/blob/ankitkumarr/core-tools/samples/SampleApp/Program.cs#L17-L19), but uncommented). The process will attempt to launch a debugger before continuing.
> NOTE: To debug your Worker, you must be using the Azure Functions Core Tools version 3.0.3381 or higher
49
+
50
+
In your worker directory (or your worker's build output directory), run:
51
+
```
52
+
func host start --dotnet-isolated-debug
53
+
```
54
+
55
+
Core Tools will run targeting your worker and the process will stop with the following message:
56
+
57
+
```
58
+
Azure Functions .NET Worker (PID: <process id>) initialized in debug mode. Waiting for debugger to attach...
59
+
```
60
+
61
+
Where `<process id>` is the ID for your worker process.
62
+
63
+
At this point, your worker process wil be paused, waiting for the debugger to be attached. You can now use Visual Studio to manually attach to the process (to learn more, see [how to attach to a running process](https://docs.microsoft.com/en-us/visualstudio/debugger/attach-to-running-processes-with-the-visual-studio-debugger?view=vs-2019#BKMK_Attach_to_a_running_process))
64
+
65
+
Once the debugger is attached, the process execution will resume and you will be able to debug.
51
66
52
67
**YOU CAN NOT DEBUG DIRECTLY USING "Start Debugging" IN VISUAL STUDIO DIRECTLY.** You need to use the command line as mentioned in the previous **Run the sample locally** part of this readme.
0 commit comments