Skip to content

Commit 567d242

Browse files
committed
Test with Windows containers and add more info
1 parent eed8d4d commit 567d242

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/containers/container-tools-react.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ The project uses the SPA Proxy during debugging. See [Improved single-age app (S
307307
Note the local URL. You'll need to provide this in a debug launch profile, which is stored in your *launchSettings.json* file.
308308

309309
1. Open the dropdown that contains debug profiles (next to the green triangle icon or **Start** button), and choose **{ProjectName} Debug Properties**, and choose the **Docker** profile.
310+
1. Check the **Environment variables** section and add the following environment variables if not already present:
311+
312+
```
313+
ASPNETCORE_ENVIRONMENT=Development,ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=Microsoft.AspNetCore.SpaProxy
314+
```
315+
310316
311317
1. Set the **URL** to `https://localhost:{proxy-port}` where `{proxy-port}` is the port from the proxy server (from step 1).
312318
@@ -318,14 +324,15 @@ The project uses the SPA Proxy during debugging. See [Improved single-age app (S
318324
319325
```json
320326
"profiles": {
321-
"Docker": {
327+
"Docker": {
322328
"commandName": "Docker",
323329
"launchBrowser": true,
324-
"launchUrl": "https://localhost:44407",
325330
"environmentVariables": {
326331
"ASPNETCORE_ENVIRONMENT": "Development",
327332
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
328-
}
333+
},
334+
"launchUrl": "https://localhost:44445",
335+
"useSSL": true
329336
}
330337
}
331338
```
@@ -345,6 +352,8 @@ The project uses the SPA Proxy during debugging. See [Improved single-age app (S
345352

346353
![Screenshot of running app.](media/container-tools-react/vs-2022/client-app-page.png)
347354

355+
If you get a build error trying to write the output assemblies, you might have to stop a previously running container to unlock the files.
356+
348357
1. Verify that you can hit a breakpoint in client-side JavaScript code by setting a breakpoint in **ClientApp/src/components/Counter.js** in the **incrementCounter** function, and then try hitting the breakpoint by clicking the **Increment** button on the Counters page.
349358

350359
![Debugging client-side JavaScript](./media/container-tools-react/vs-2022/debugging-client-javascript.png)

0 commit comments

Comments
 (0)