Skip to content

Commit 8de3dcd

Browse files
committed
Final revisions
1 parent 973db13 commit 8de3dcd

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

articles/azure-functions/functions-develop-vs.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Unless otherwise noted, procedures and examples shown are for Visual Studio 2022
2525

2626
## Prerequisites
2727

28-
- Azure Functions Tools. To add Azure Function Tools, include the **Azure development** workload in your Visual Studio installation. If you are using Visual Studio 2017, you may need to [follow some additional installation steps](#azure-functions-tools-with-visual-studio-2017).
28+
- Azure Functions Tools. To add Azure Function Tools, include the **Azure development** workload in your Visual Studio installation. If you're using Visual Studio 2017, you may need to [follow some extra installation steps](#azure-functions-tools-with-visual-studio-2017).
2929

3030
- Other resources that you need, such as an Azure Storage account, are created in your subscription during the publishing process.
3131

@@ -78,7 +78,7 @@ In C# class library functions, the bindings used by the function are defined by
7878

7979
![Create a Queue storage trigger function](./media/functions-develop-vs/functions-vstools-create-queuetrigger.png)
8080

81-
You will then be prompted to choose between two Azure storage emulators or referencing a provisioned Azure storage account.
81+
You'll then be prompted to choose between two Azure storage emulators or referencing a provisioned Azure storage account.
8282

8383
This trigger example uses a connection string with a key named `QueueStorage`. This key, stored in the [local.settings.json file](functions-develop-local.md#local-settings-file), either references the Azure storage emulators or an Azure storage account.
8484

@@ -134,7 +134,7 @@ As with triggers, input and output bindings are added to your function as bindin
134134

135135
---
136136

137-
In this example replace `<BINDING_TYPE>` with the name specific to the binding extension and `<TARGET_VERSION>` with a specific version of the package, such as `3.0.0-beta5`. Valid versions are listed on the individual package pages at [NuGet.org](https://nuget.org). The major versions that correspond to Functions runtime 1.x or 2.x are specified in the reference article for the binding.
137+
In this example, replace `<BINDING_TYPE>` with the name specific to the binding extension and `<TARGET_VERSION>` with a specific version of the package, such as `3.0.0-beta5`. Valid versions are listed on the individual package pages at [NuGet.org](https://nuget.org). The major versions that correspond to Functions runtime 1.x or 2.x are specified in the reference article for the binding.
138138
139139
3. If there are app settings that the binding needs, add them to the `Values` collection in the [local setting file](functions-develop-local.md#local-settings-file).
140140

@@ -163,7 +163,7 @@ For a full list of the bindings supported by Functions, see [Supported bindings]
163163

164164
## Run functions locally
165165

166-
Azure Functions Core Tools lets you run Azure Functions project on your local development computer. When you press F5 to debug a Functions project, the local Functions host (func.exe) starts to listen on a local port (usually 7071). Any callable function endpoints are written to the output, and you can use these for testing your functions. For more information, see [Work with Azure Functions Core Tools](functions-run-local.md). You're prompted to install these tools the first time you start a function from Visual Studio.
166+
Azure Functions Core Tools lets you run Azure Functions project on your local development computer. When you press F5 to debug a Functions project, the local Functions host (func.exe) starts to listen on a local port (usually 7071). Any callable function endpoints are written to the output, and you can use these endpoints for testing your functions. For more information, see [Work with Azure Functions Core Tools](functions-run-local.md). You're prompted to install these tools the first time you start a function from Visual Studio.
167167

168168
To start your function in Visual Studio in debug mode:
169169

@@ -211,16 +211,15 @@ You can also manage application settings in one of these other ways:
211211

212212
## Remote Debugging
213213

214-
To debug your function app remotely, you must publish a debug configuration of your project. You also need to enable remote debugging in your function app in Azure. The way you enable remote debugging depends on the execution model of your C# project:
214+
To debug your function app remotely, you must publish a debug configuration of your project. You also need to enable remote debugging in your function app in Azure.
215215

216-
[!INCLUDE [functions-dotnet-execution-model](../../includes/functions-dotnet-execution-model.md)]
217-
218-
This section assumes you have already published to your function app using a release configuration.
216+
This section assumes you've already published to your function app using a release configuration.
219217

220218
### Remote debugging considerations
221219

222220
* If you didn't originally publish a debug configuration of your project, you have to republish a debug version of the app.
223221
* Remote debugging isn't recommended on a production service.
222+
* If you have [Just My Code debugging](/visualstudio/debugger/just-my-code#BKMK_Enable_or_disable_Just_My_Code) enabled, disable it.
224223
* Avoid long stops at breakpoints when remote debugging. Azure treats a process that is stopped for longer than a few minutes as an unresponsive process, and shuts it down.
225224
* While you're debugging, the server is sending data to Visual Studio, which could affect bandwidth charges. For information about bandwidth rates, see [Azure Pricing](https://azure.microsoft.com/pricing/calculator/).
226225

@@ -238,6 +237,8 @@ To republish a debug configured project to your function app in Azure:
238237

239238
The way you attach the debugger depends on your execution mode. When debugging an isolated process app, you currently need to attach the remote debugger to a separate .NET process, and several other configuration steps are required.
240239

240+
When you're done, you should [disable remote debugging](#disable-remote-debugging).
241+
241242
# [In-process](#tab/in-process)
242243

243244
To attach a remote debugger to a function app running in-process with the Functions host:
@@ -246,13 +247,13 @@ To attach a remote debugger to a function app running in-process with the Functi
246247

247248
:::image type="content" source="media/functions-develop-vs/attach-to-process-in-process.png" alt-text="Attach debugger from Visual Studio":::
248249

249-
Visual Studio connects to your function app and enables remote debugging, if it's not already enabled. It also locates and attaches the debugger to the host process for the app. At this point, you can debug your function app as normal. When you are done, you should [disable remote debugging](#disable-remote-debugging).
250+
Visual Studio connects to your function app and enables remote debugging, if it's not already enabled. It also locates and attaches the debugger to the host process for the app. At this point, you can debug your function app as normal.
250251

251252
# [Isolated process](#tab/isolated-process)
252253

253254
To attach a remote debugger to a function app running in a process separate from the Functions host:
254255

255-
1. From the **Publish** tab, select the ellipses (**...**) in the **Hosting** section, and then choose **Download publish profile**. This downloads a copy of the publish profile and opens the download location. You need this file, which contains the credentials used to attach to your isolated process running in Azure.
256+
1. From the **Publish** tab, select the ellipses (**...**) in the **Hosting** section, and then choose **Download publish profile**. This action downloads a copy of the publish profile and opens the download location. You need this file, which contains the credentials used to attach to your isolated process running in Azure.
256257

257258
> [!CAUTION]
258259
> The .publishsettings file contains your credentials (unencoded) that are used to administer your function app. The security best practice for this file is to store it temporarily outside your source directories (for example in the Libraries\Documents folder), and then delete it after it's no longer needed. A malicious user who gains access to the .publishsettings file can edit, create, and delete your function app.
@@ -264,15 +265,13 @@ To attach a remote debugger to a function app running in a process separate from
264265
Visual Studio connects to your function app and enables remote debugging, if it's not already enabled.
265266

266267
> [!NOTE]
267-
> Because the remote debugger isn't able to connect to the host process, you'll see an error. This is expected.
268-
269-
When you are done, you should [disable remote debugging](#disable-remote-debugging).
268+
> Because the remote debugger isn't able to connect to the host process, you could see an error. In any case, the default debugging won't break into your code.
270269

271270
1. Back in Visual Studio, copy the URL for the **Site** under **Hosting** in the **Publish** page.
272271

273-
1. From the **Debug** menu, select **Attach to Process**, and in the **Attach to process** window, paste the URL in the **Connection Target**, remove `https://` and insert `scm` and append the port `:4024`.
272+
1. From the **Debug** menu, select **Attach to Process**, and in the **Attach to process** window, paste the URL in the **Connection Target**, remove `https://` and append the port `:4024`.
274273
275-
Verify that your target looks like `<FUNCTION_APP>.scm.azurewebsites.net:4024` and press **Enter**.
274+
Verify that your target looks like `<FUNCTION_APP>.azurewebsites.net:4024` and press **Enter**.
276275

277276
![Visual Studio attach to process dialog](./media/functions-develop-vs/attach-to-process-dialog.png)
278277

@@ -282,15 +281,15 @@ To attach a remote debugger to a function app running in a process separate from
282281

283282
![Visual Studio enter credential](./media/functions-develop-vs/creds-dialog.png)
284283

285-
1. Check **Show process from all users** and then choose **dotnet.exe** and select **Attach**. When the operation completes you are attached to your C# class library code running in an isolated process.
284+
1. Check **Show process from all users** and then choose **dotnet.exe** and select **Attach**. When the operation completes, you're attached to your C# class library code running in an isolated process. At this point, you can debug your function app as normal.
286285

287286
---
288287

289288
### Disable remote debugging
290289

291-
After you're done remote debugging your code, you should disable remote debugging in the Azure portal.
290+
After you're done remote debugging your code, you should disable remote debugging in the Azure portal. You can use this same process to enable remote debugging outside of Visual Studio.
292291

293-
1. In the the **Publish** tab in your project, select the ellipses (**...**) in the **Hosting** section, and choose **Open in Azure portal**. This opens the function app in the Azure portal to which your project is deployed.
292+
1. In the **Publish** tab in your project, select the ellipses (**...**) in the **Hosting** section, and choose **Open in Azure portal**. This action opens the function app in the Azure portal to which your project is deployed.
294293

295294
1. In the functions app, select **Configuration** under **settings**, choose **General Settings**, set **Remote Debugging** to **Off**, and select **Save** then **Continue**.
296295

0 commit comments

Comments
 (0)