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
- Debugging with the **Update Production Files** option
33
50
34
51
35
-
Supported service entry point debug features:
52
+
Supported Service Entry Point (SEP) debug features:
36
53
37
54
- Setting a service entry point on a program, service program, module or procedure
38
55
- Enabling, disabling and removing a service entry point
39
56
- Setting a condition on a service entry point
40
57
- Modifying the user profile of a service entry point
41
58
- Logging service entry point activities in an output channel
42
-
- Saving service entry points across multiple IDE sessions
59
+
- Saving service entry points across multiple client sessions
43
60
- Refreshing service entry points after programs are recompiled
44
61
45
62
### Limitations
46
63
47
64
The following features are not supported in the current release:
48
65
- Code coverage
66
+
- Additional source lookup path. If the debug source is moved to a different location after the program is compiled, there is no way to instruct the debugger to lookup the source in a different location.
49
67
50
68
51
69
@@ -55,11 +73,11 @@ The following features are not supported in the current release:
55
73
56
74
<Card>
57
75
58
-
After [configuring](../configure/) the Debug Service, launching a debug session is a click of a button away. When you have active source open, a new Debug button will appear in the navigation bar. Breakpoints can be set prior to debugging, or during the debugging session.
76
+
After [configuring](../configure/) the Debug Service, launching a debug session is a click of a button away. To start a batch debug session, right-click on a program object from the Object Browser and select the **Start Debugging > Debug as Batch** action.
59
77
60
78
</Card><Card>
61
79
62
-

80
+

63
81
64
82
</Card></CardGrid>
65
83
@@ -69,44 +87,47 @@ After [configuring](../configure/) the Debug Service, launching a debug session
69
87
70
88
<Card>
71
89
72
-
Clicking the Debug button will display an input box which will allow the user to customise the command which starts the debug job. This allows the developer to pass in parameters, or call another program to launch the debug session.
90
+
Selecting the Debug action will display an input box which allows the user to customise the command that starts the debug job. This allows the developer to pass in parameters, or call another program to launch the debug session.
73
91
74
92
After the debug session has started, every session will break on entry. You can read more about the debugging UI on the [Debug actions section on the Visual Studio Code documentation](https://code.visualstudio.com/docs/editor/debugging#_debug-actions)<Iconname="external"color="cyan"class="icon-inline" />.
75
93
76
94
</Card><Card>
77
95
78
-

79
-
80
-
</Card></CardGrid>
81
-
96
+

82
97
---
83
98
84
99
<CardGrid>
85
100
86
101
<Card>
87
102
88
-
To debug a program from the Object Browser, right-click on the program object and select the **Debug Program**option. Like before this will also display an input box to modify the command which starts the debug job.
103
+
The debug source will be opened in the editor area. A floating Debug panel which contains the common debug actions (e.g. continue, step over, stop, etc) will appear at the top. Breakpoints can be set prior to debugging, or during the debugging session. You can see the value of a local variable in the **Variables**view. You can also hover over a variable in the debug editor to show its value. A monitored expression can be added to the **Watch** view.
89
104
90
105
</Card><Card>
91
106
92
-

107
+

93
108
94
109
</Card></CardGrid>
95
110
111
+
96
112
### Managing Service Entry Points
97
113
<CardGrid>
98
114
99
115
<Card>
100
-
Service Entry Point (SEP) can be set using the **Set Service Entry Point** popup menu action from the **Project Explorer** and **Object Browser**. SEP can also be set using the **Create Service Entry Point** toolbar action from the **Service Entry Points** view in the **Run and Debug** side bar. The action will prompt for the Service Entry Point location. The Service Entry Point location can be in a short format which includes the library name and program name (e.g. `MY_LIB/MY_PGM`), or in a long format which also includes the program type, module name and procedure name (e.g. `MY_LIB/MY_PGM *PGM/MY_MOD/MY_PROC`). The supported program types are `*PGM` and `*SRVPGM`.
116
+
117
+
Service Entry Point (SEP) can be set using the **Set Service Entry Point** popup menu action from the **Object Browser**. SEP can also be set using the **Create Service Entry Point** toolbar action from the **Service Entry Points** view in the **Run and Debug** side bar. The action will prompt for the service entry point location. The service entry point location can be in a short format which includes the library name and program name (e.g. `MY_LIB/MY_PGM`), or in a long format which also includes the program type, module name and procedure name (e.g. `MY_LIB/MY_PGM *PGM/MY_MOD/MY_PROC`). The supported program types are `*PGM` and `*SRVPGM`.
118
+
101
119
</Card><Card>
120
+
102
121

122
+
103
123
</Card></CardGrid>
124
+
104
125
- A checkbox at a SEP indicates that the SEP is enabled. You can clear the checkbox to disable the SEP.
105
126
- You can use the **Edit Condition…** inline action to set a condition on a SEP. The condition is an expression that is evaluated to a boolean value at the given context.
106
127
- You can use the **Remove Service Entry Point** inline action to remove the selected SEP, or the **Remove All Service Entry Points** toolbar action to remove all SEPs from the view.
107
128
- You can use the **Modify User Profile...** context menu action to modify the owner of the job where the service entry point is hit. The default owner user profile is the currently logged on user.
108
-
- Service Entry Point related messages appear in the **IBM i Service Entry Points** output channel.
109
-
- Service Entry Points are saved in the debug service job on the host. When a new debug client connects to a running debug service, it will restore the saved service entry points for the current user.
129
+
- Service entry point related messages appear in the **IBM i Service Entry Points** output channel.
130
+
- Service entry points are saved in the debug service job on the host. When a new debug client connects to a running debug service, it will restore the saved service entry points for the current user.
110
131
- If a program or service program is recompiled, you can use the **Refresh** action from the context menu to refresh the selected SEP, or use the **Refresh All Service Entry Points** toolbar action to refresh all SEPs in the **Service Entry Points** view.
111
132
112
133
### Settings
@@ -121,26 +142,43 @@ The following settings are available from the **Debugger** tab of the **IBM i: C
121
142
122
143
-**Debug trace**: Enable tracing for **Debug Adapter Protocol**.
123
144
124
-
The debug port and SEP debug port are specified in the DebugService.env file on the host.
145
+
The debug port and SEP debug port are specified in the DebugService.env file on the host.
125
146
126
147
127
148
## Common issues
128
149
129
-
### Debug hangs
150
+
### `STRDBGSVR` requirement
130
151
131
-
There is a [known issue](https://github.com/codefori/vscode-ibmi/issues/1059)<Iconname="github"class="icon-inline" /> that when you start debugging from VS Code, the debugger hangs and doesn't launch.
152
+
The Debug Service that is started depends on the traditional Debug Server.
132
153
133
-
The fix is to check if you've got a prior debug job stuck in `MSGW`. You can do this with `WRKACTJOB`, or a similar command like `WRKSBSJOB QBATCH`.
154
+

134
155
135
-
**Users should no longer face this issue**as we now submit debug jobs to `QSYSWRK` with `QSYSNOMAX`.
156
+
If you receive this message, do as it says. Simply start the Debug Server with `STRDBGSVR` from a green screen.
136
157
137
-
### `STRDBGSVR` requirement
158
+
### Self-signed certificate issue
138
159
139
-
The Debug Service that is started depends on the traditional Debug Server.
160
+
If you are getting a self-signed certificate error or a certificate signature failure when starting a batch debug session or setting a SEP, please use the following steps for diagnostics:
140
161
141
-

162
+
- Find out the certificate location on the client machine
163
+
164
+
* Turn on **Debug trace** (see details in FAQ entry "Can I get trace information for the debug service?" )
165
+
166
+
* Inspect the "Connection settings" line in the Debug Console when starting a batch debug session or setting a SEP.
167
+
168
+
* The "capath" field under "Connection Settings" contains the fully qualified path of the client certificate.
169
+
170
+
* If the "capath" field is undefined, update your Code for IBM i extension to a newer level; otherwise continue with the next step.
171
+
172
+
- Inspect the TrustStore and debug_service.crt files on the host
173
+
174
+
* When you use Navigator to generate the debug service trust store, you will get the following two files on the host:
* Verify that the debug_service.crt file has the same contents as the certificate on the client machine, which is indicated by the "capath" value in the previous step. Both .crt files are text files. You can open a .crt file in a text editor to inspect its contents. If the certificate on the client machine is different from the debug_service.crt file on the host, you can remove the certificate on the client machine. Code for IBM i will download the client certificate again upon the next connection to the host.
142
181
143
-
If you receive this message, do as it says. Simply start the Debug Server with `STRDBGSVR` from a greenscreen.
144
182
145
183
### IP not in cert list
146
184
@@ -232,9 +270,6 @@ You need to restart the debug service after changing a port number.
232
270
**Question**: I am getting a message “EQAVS1007E myHost on port 8005 could not be connected” when I start a debug session.
233
271
**Answer**: IBM i Debug Service is not started yet. You need to start debug service before starting a debug session.
234
272
235
-
**Question**: I am seeing a message “IBM i Debug Server has not been started yet. Please run the STRDBGSVR command from a user profile with enough authority.”.
236
-
**Answer**: You need to run STRDBGSVR from a terminal session to start Debug Server (QB5ROUTER) first. IBM i Debug Service requires a running Debug Server.
237
-
238
273
**Question**: I am seeing a message “Your debug server version is not up to date. IBM i Debug Service requires a host PTF update.”.
239
274
**Answer**: IBM i Debug Service depends on the following debug server PTFs for strong password encryption. You need to load one of the PTFs below or a superseded PTF.
240
275
- V7R3 PTF SI82198
@@ -244,6 +279,15 @@ You need to restart the debug service after changing a port number.
244
279
**Question**: I do not have the QDBGSRV user profile after installing the debug service on IBM i 7.5.
245
280
**Answer**: The debug service PTFs on 7.3/7.4/7.5 are update installs. An update install depends on a previous installation of the debug service PTF. The update install does not create the QDBGSRV user profile. If you have not installed debug service before, please install the v1 debug service PTF first, and then update the debug service PTF to the next levels.
246
281
282
+
**Question**: I am getting the error that the startDebugServiceNavigator.log file cannot be created when starting debug service.
283
+
**Answer**: You can use the "DSPAUT OBJ('ifs_path')" command to verify the authority of the following IFS folders:
284
+
285
+
/QIBM
286
+
/QIBM/UserData
287
+
/QIBM/UserData/IBMiDebugService
288
+
289
+
You should have *PUBLIC *RX authority on /QIBM and /QIBM/UserData, and *PUBLIC *RWX authority on /QIBM/UserData/IBMiDebugService.
290
+
247
291
**Question**: How can I set a Service Entry Point on a procedure?
248
292
**Answer**: Select the **Set Service Entry Point** action on the target program or service program. In the service entry point location prompt, change the last part of the entry field value “/*ALL/*ALL” to specify the module name and procedure name.
249
293
@@ -267,6 +311,7 @@ You need to restart the debug service and the debug router (QB5ROUTER) after the
267
311
**Question**: What diagnostic information should I collect to report a debug problem?
268
312
**Answer**: Please collect the following diagnostic information:
269
313
- The content of the DebugService_log.txt file under /QIBM/UserData/IBMIDEBUGSERVICE.
270
-
- The content of the debug service workspace log in /QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/USER/.metadata/.log, where USER is the user profile that starts the debug service.
314
+
- The content of the startDebugServiceNavigator.log file under /QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace.
315
+
- The content of the debug service workspace log in /QIBM/UserData/IBMIDEBUGSERVICE/startDebugService_workspace/QDBGSRV/.metadata/.log. Please note that some IFS browsing tools hide this file, as the name starts with a dot.
271
316
- Check the **Debug trace** option from the Debugger tab of the Connection Settings page. Save the trace text in the **Debug Console** to a file. Edit the file to remove the user password that appears under the trace statement for the launch request.
0 commit comments