@@ -12,8 +12,8 @@ However, this task is made absurdly simple with the help of OpenShift Toolkit.
12
12
` odo ` enables this plugin to do what it does.
13
13
14
14
## Prerequisites
15
- 1 . [ You have logged in to your cluster] ( ../../ quickstart/nodejs.md#step-1-connect-to-your-cluster-and-create-a-new-namespace-or-project ) .
16
- 2 . [ You have initialized a Node.js application with odo] ( ../../ quickstart/nodejs.md#step-2-initializing-your-application--odo-init- ) .
15
+ 1 . [ You have logged in to your cluster] ( ../quickstart/nodejs.md#step-1-connect-to-your-cluster-and-create-a-new-namespace-or-project ) .
16
+ 2 . [ You have initialized a Node.js application with odo] ( ../quickstart/nodejs.md#step-2-initializing-your-application--odo-init- ) .
17
17
3 . Open the application in the IDE.
18
18
4 . Install OpenShift Toolkit Plugin in your preferred VS Code or a Jet Brains IDE.
19
19
@@ -24,39 +24,39 @@ In the plugin window, you should be able to see the cluster you are logged into
24
24
25
25
Right click on "my-nodejs-app" and select "Start on Dev".
26
26
27
- ![ ] ( /docs/website/static/ img/docs/user-guides/advanced/debugging /Start%20Dev%20Session.png " Starting Dev session ")
27
+ ![ ] ( /img/docs/user-guides/advanced/Start%20Dev%20Session.png " Starting Dev session ")
28
28
29
29
Wait until the application is running on the cluster.
30
30
31
- ![ ] ( /docs/website/static/ img/docs/user-guides/advanced/debugging /Wait%20until%20Dev%20Session%20finishes.png " Wait until Dev session finishes ")
31
+ ![ ] ( /img/docs/user-guides/advanced/Wait%20until%20Dev%20Session%20finishes.png " Wait until Dev session finishes ")
32
32
33
33
Our application is now available at 127.0.0.1:20001. The debug server is running at 127.0.0.1:20002.
34
34
35
35
## Step 2. Start the Debugging session
36
36
37
37
Right click on "my-nodejs-app" and select "Debug".
38
38
39
- ![ ] ( /docs/website/static/ img/docs/user-guides/advanced/debugging /Select%20Debug%20Session.png " Select Debug ")
39
+ ![ ] ( /img/docs/user-guides/advanced/Select%20Debug%20Session.png " Select Debug ")
40
40
41
41
Debug session should have started successfully at the debug port, in this case, 3000. And you must be looking at the "DEBUG CONSOLE".
42
42
43
- ![ ] ( /docs/website/static/ img/docs/user-guides/advanced/debugging /Debug%20Session%20Starts.png " Debug session starts ")
43
+ ![ ] ( /img/docs/user-guides/advanced/Debug%20Session%20Starts.png " Debug session starts ")
44
44
45
45
## Step 3. Set Breakpoints in the application
46
46
47
47
Now that the debug session is running, we can set breakpoints in the code.
48
48
49
49
Open 'server.js' file if you haven't opened it already. We will set a breakpoint on Line 55 by clicking the red dot that appears right next to line numbers.
50
50
51
- ![ ] ( /docs/website/static/ img/docs/user-guides/advanced/debugging /Add%20Breakpoint.png " Add breakpoint ")
51
+ ![ ] ( /img/docs/user-guides/advanced/Add%20Breakpoint.png " Add breakpoint ")
52
52
53
53
From a new terminal, or a browser window, ping the url at which the application is available, in this case, it is 127.0.0.1:20001.
54
54
55
- ![ ] ( /docs/website/static/ img/docs/user-guides/advanced/debugging /Ping%20Application.png " Ping Application ")
55
+ ![ ] ( /img/docs/user-guides/advanced/Ping%20Application.png " Ping Application ")
56
56
57
57
The debug session should halt execution at the breakpoint, at which point you can start debugging the application.
58
58
59
- ![ ] ( /docs/website/static/ img/docs/user-guides/advanced/debugging /Application%20Debugged.png " Application Debugged ")
59
+ ![ ] ( /img/docs/user-guides/advanced/Application%20Debugged.png " Application Debugged ")
60
60
61
61
62
62
To learn more about running and debugging an application on cluster with OpenShift Toolkit, see the links below.
0 commit comments