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: docs/javascript/tutorial-nodejs-with-react-and-jsx.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ First, create a Node.js web application project.
54
54
55
55
Visual Studio creates the new solution and opens your project.
56
56
57
-

57
+

58
58
59
59
* Highlighted in bold is your project, using the name you gave in the **New Project** dialog box. In the file system, this project is represented by a *.njsproj* file in your project folder. You can set properties and environment variables associated with the project by right-clicking the project and choosing **Properties**. You can do round-tripping with other development tools, since the project file does not make custom changes to the Node.js project source.
60
60
@@ -83,7 +83,7 @@ This app requires a number of npm modules to run correctly.
83
83
84
84
1. In the **Install New npm Packages** dialog box, search for the react package, and select **Install Package** to install it.
Select the **Output** window to see progress on installing the package (select **Npm** in the **Show output from** field). When installed, the package appears under the **npm** node.
89
89
@@ -110,7 +110,7 @@ This app requires a number of npm modules to run correctly.
110
110
111
111
Here are the npm modules as they appear in Solution Explorer after they are installed.
> If you prefer to install npm packages using the command line, right-click the project node and choose **Open Command Prompt Here**. Use standard Node.js commands to install packages.
@@ -260,7 +260,7 @@ In the previous steps, you added *webpack-config.js* to the project. Next, you a
If you see any errors instead of the preceding output, you must resolve them before your app will work. If your npm package versions are different than the versions shown inthis tutorial, that can be a source oferrors. One way to fix errors is to use the exact versions shown in the earlier steps. Also, if one or more of these package versions has been deprecated and results in an error, you may need to install a more recent version to fix errors.
266
266
@@ -272,23 +272,23 @@ In the previous steps, you added *webpack-config.js* to the project. Next, you a
272
272
273
273
1. If prompted to reload externally modified files, select **Yes to All**.
Each time you make changes to *app.tsx*, you must rerun the webpack command.
278
278
279
279
## Run the app
280
280
281
281
1. Make sure that Chrome is selected as the current debug target.
282
282
283
-

283
+

284
284
285
285
1. To run the app, press **F5** (**Debug**>**Start Debugging**) or the green arrow button.
286
286
287
287
ANode.jsconsolewindow opens that shows the port on which the debugger is listening.
288
288
289
289
Visual Studio starts the app by launching the startup file, *server.js*.
290
290
291
-

291
+

292
292
293
293
1. Close the browser window.
294
294
@@ -298,7 +298,7 @@ Each time you make changes to *app.tsx*, you must rerun the webpack command.
298
298
299
299
1. In *server.js*, click in the gutter to the left of the `staticPath` declaration to set a breakpoint:
300
300
301
-

301
+

302
302
303
303
Breakpoints are the most basic and essential feature of reliable debugging. A breakpoint indicates where Visual Studio should suspend your running code so you can take a look at the values of variables, or the behavior of memory, or whether or not a branch of code is getting run.
304
304
@@ -326,7 +326,7 @@ In the preceding section, you attached the debugger to server-side Node.js code.
326
326
327
327
1. Switch to Visual Studio and set a breakpoint in*app-bundle.js* code in the `render()`function as shown in the following illustration:
328
328
329
-

329
+

330
330
331
331
1. With Chrome selected as the debug target in Visual Studio, press **Ctrl**+**F5** (**Debug** > **Start Without Debugging**) to run the app in the browser.
332
332
@@ -338,7 +338,7 @@ In the preceding section, you attached the debugger to server-side Node.js code.
338
338
339
339
1. Select the Chrome process with the correct host port (1337 in this example), and select **Attach**.
340
340
341
-

341
+

342
342
343
343
You know the debugger has attached correctly when the DOM Explorer and the JavaScript Console open in Visual Studio. These debugging tools are similar to Chrome Developer Tools and F12 Tools for Edge.
(1) Highlighted in **bold** is your project, using the name you gave in the **New Project** dialog box. In the file system, this project is represented by a *.njsproj* file in your project folder. You can set properties and environment variables associated with the project by right-clicking the project and choosing **Properties**. You can do round-tripping with other development tools, because the project file does not make custom changes to the Node.js project source.
77
77
@@ -154,19 +154,19 @@ IntelliSense is a Visual Studio tool that assists you as you write code.
154
154
155
155
1. Put your cursor after the `data` string, type `: get` and IntelliSense will show you the `getData` function defined earlier in the code. Select `getData`.
1. Fix the code by adding the comma (`,`) before `"data"`.
172
172
@@ -182,21 +182,21 @@ You're next going to run the app with the Visual Studio debugger attached. Befor
182
182
183
183
Breakpoints are the most basic and essential feature of reliable debugging. A breakpoint indicates where Visual Studio should suspend your running code so you can take a look at the values of variables, or the behavior of memory, or whether or not a branch of code is getting run.
184
184
185
-

185
+

186
186
187
187
## Run the application
188
188
189
189
1. Select the debug target in the Debug toolbar.
190
190
191
-

191
+

192
192
193
193
1. Press **F5** (**Debug**>**Start Debugging**) to run the application.
194
194
195
195
The debugger pauses at the breakpoint you set. Now, you can inspect your app state.
196
196
197
197
1. Hover over `getData` to see its properties in a DataTip
0 commit comments