Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .astro/astro/content.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,16 @@ declare module 'astro:content' {
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"developing/debug/index.mdx": {
id: "developing/debug/index.mdx";
slug: "developing/debug";
"developing/debug/configure.mdx": {
id: "developing/debug/configure.mdx";
slug: "developing/debug/configure";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
"developing/debug/overview.mdx": {
id: "developing/debug/overview.mdx";
slug: "developing/debug/overview";
body: string;
collection: "docs";
data: InferEntrySchema<"docs">
Expand Down Expand Up @@ -596,5 +603,5 @@ declare module 'astro:content' {

type AnyEntryMap = ContentEntryMap & DataEntryMap;

export type ContentConfig = typeof import("./../../src/content/config.js");
export type ContentConfig = typeof import("../../src/content/config.js");
}
12 changes: 11 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@ export default defineConfig({
},
{
label: 'Debugging',
link: 'developing/debug/',
collapsed: true,
items: [
{
label: 'Overview',
link: 'developing/debug/overview',
},
{
label: 'Configuring',
link: 'developing/debug/configure',
}
]
},
{
label: 'ILEDocs',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,60 +1,8 @@
---
title: Guide
title: Configuring the debugger
---
import { Aside, CardGrid, Card, Icon, Tabs, TabItem } from '@astrojs/starlight/components';

# ILE Debugging

Debugging ILE programs is now available inside of Visual Studio Code. We've added UI to make sure setting up the Debug Service to be a swift process.

<Aside type="note">You must have `bash` set as your default shell. [See Bash Shell Required](/docs/tips/bash/) for more info. </Aside>

# Starting to debug

<CardGrid>

<Card>

After configuring 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.

</Card><Card>

![](./debug1.png)

</Card></CardGrid>

---

<CardGrid>

<Card>

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.

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)<Icon name="external" color="cyan" class="icon-inline" />.

</Card><Card>

![](./debug2.png)

</Card></CardGrid>

---

<CardGrid>

<Card>

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.

</Card><Card>

![](./debug3.png)

</Card></CardGrid>

# Configuring the debugger

## General requirements

* PTFs (see below)
Expand Down Expand Up @@ -193,44 +141,3 @@ When there are newer Debug service or Navigator/HTTP Group PTFs, the following s
- If HTTP Group PTF does not show as applied, IPL might be required.
2. Regenerate debug service trust store (as described above)

# Common issues

## Debug hangs

There is a [known issue](https://github.com/codefori/vscode-ibmi/issues/1059)<Icon name="github" class="icon-inline" /> that when you start debugging from VS Code, the debugger hangs and doesn't launch.

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`.

**Users should no longer face this issue** as we now submit debug jobs to `QSYSWRK` with `QSYSNOMAX`.

## `STRDBGSVR` requirement

The Debug Service that is started depends on the traditional Debug Server.

![](./error_2.png)

If you receive this message, do as it says. Simply start the Debug Server with `STRDBGSVR` from a greenscreen.

## IP not in cert list

**It is always recommended you use a hostname in the connection settings to make use of the debugger**.

![](./error_1.png)

*Error that is shown when connecting to the debugger if connecting using an IP address.*

This error occurs when the hostname used to connect to the debugger (which might be the IP address that was configured in the connection settings) is not the same as the host name created as part of the certificate.

If you are using a system that doesn't have a host name (for example `YOURSYSTEM`, or `pub400.com`), then an entry should be added to your device's 'hosts' file. This entry should be the same on all devices in your network to ensure that everyone is using the same hostname.

* Windows: `c:\Windows\System32\Drivers\etc\hosts`
* Mac: `/etc/hosts`

Your entry might look like this:

```txt title="hosts" {2}
# IP HOSTNAME
192.168.0.20 MYIBMI
```

If you find that you've added your local hostname entry and the error is still occurring, then you may need to delete the existing certificates from `/QIBM/ProdData/IBMiDebugService/bin/certs` on the IFS and generate them again in the Walkthrough.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading