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: aspnetcore/blazor/debug.md
+47-3Lines changed: 47 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,11 +93,55 @@ While debugging a Blazor WebAssembly app, you can also debug server code:
93
93
> [!NOTE]
94
94
> Breakpoints are **not** hit during app startup before the debug proxy is running. This includes breakpoints in `Program.Main` (`Program.cs`) and breakpoints in the [`OnInitialized{Async}` methods](xref:blazor/components/lifecycle#component-initialization-methods) of components that are loaded by the first page requested from the app.
95
95
96
-
# [Visual Studio Code](#tab/visual-studio-code)
96
+
If the app is hosted at a different [app base path](xref:blazor/host-and-deploy/index#app-base-path) than `/`, update the following properties in `Properties/launchSettings.json` to reflect the app's base path:
97
+
98
+
*`applicationUrl`:
99
+
100
+
```json
101
+
"iisSettings": {
102
+
...
103
+
"iisExpress": {
104
+
"applicationUrl": "http://localhost:{INSECURE PORT}/{APP BASE PATH}/",
105
+
"sslPort": {SECURE PORT}
106
+
}
107
+
},
108
+
```
109
+
110
+
*`inspectUri` of each profile:
111
+
112
+
```json
113
+
"profiles": {
114
+
...
115
+
"{PROFILE 1, 2, ... N}": {
116
+
...
117
+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/{APP BASE PATH}/_framework/debug/ws-proxy?browser={browserInspectUri}",
118
+
...
119
+
}
120
+
}
121
+
```
122
+
123
+
The placeholders in the preceding settings:
124
+
125
+
*`{INSECURE PORT}`: The insecure port. A random value is provided by default, but a custom port is permitted.
126
+
*`{APP BASE PATH}`: The app's base path.
127
+
*`{SECURE PORT}`: The secure port. A random value is provided by default, but a custom port is permitted.
128
+
*`{PROFILE 1, 2, ... N}`: Launch settings profiles. Usually, an app specifies more than one profile by default (for example, a profile for IIS Express and a project profile, which is used by Kestrel server).
97
129
98
-
<aid="vscode"></a>
130
+
In the following examples, the app is hosted at `/OAT` with an app base path configured in `wwwroot/index.html` as `<base href="/OAT/">`:
0 commit comments