Debugging Application Engine Programs 调试应用程序引擎程序

本文主要是介绍Debugging Application Engine Programs 调试应用程序引擎程序,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Debugging Application Engine Programs

调试应用程序引擎程序

This section discusses how to:

本节讨论如何:

  • Enable the Application Engine debugger.
  • 启用应用程序引擎调试器。
  • Set debugging options.
  • 设置调试选项。
Enabling the Application Engine Debugger
启用应用程序引擎调试器

To run a program in debug mode:

在调试模式下运行程序:

  1. Set the debug option.

设置调试选项。

You can set the debug option in the following locations:

您可以在以下位置设置调试选项:

    • Start PeopleSoft Configuration Manager and select the Process Scheduler tab.
    • 启动PeopleSoft配置管理器并选择进程调度器选项卡。

In the Application Engine group, enable debug by selecting the Debug check box. This method applies to all methods of invocation.

在“应用程序引擎”组中,通过选中“调试”复选框启用调试。此方法适用于调用的所有方法。

    • If you used the command line option to invoke your Application Engine program, then you can include the −DEBUG Y parameter in the command line you submit to PSAE.EXE.
    • 如果您使用命令行选项来调用应用程序引擎程序,则可以在提交给PS AE.EXE的命令行中包含DEBUG Y参数。

If the Debug check box is already selected in PeopleSoft Configuration Manager, then you do not need to include the −DEBUG parameter in your command line.

如果已在PeopleSoft Configuration Manager中选中了Debug复选框,则不需要在命令行中包含DEBUG参数。

Note: Setting debug capabilities in either PeopleSoft Configuration Manager or the command line turns debug mode on. However, if you have debug enabled in Configuration Manager and you submit −DEBUG N on the command line, then the PeopleSoft Configuration Manager setting defines your default command line value and the command line can override the default.

附注:在PeopleSoft Configuration Manager或命令行中设置调试功能将打开调试模式。但是,如果您在配置管理器中启用了调试,并且在命令行上提交了-DEBUG N,则PeopleSoft配置管理器设置将定义您的默认命令行值,并且命令行可以覆盖默认值。

    • If you have PeopleCode in your Application Engine program, enable the PeopleCode debugger.
    • 如果您的应用程序引擎程序中有PeopleCode,请启用PeopleCode调试器。

When you launch your program and the PeopleCode action runs, enter the PeopleCode debugger.

启动程序并运行PeopleCode操作时,输入PeopleCode调试器。

  1. Run the Application Engine program to debug.

运行应用程序引擎程序进行调试。

  1. At the Application Engine Debugger prompt, enter a command to enable a debugging option.

在“应用程序引擎调试器”提示符下,输入命令以启用调试选项。

Each command is represented by a single letter, such as X, L, or M. Enter the letter that corresponds to the option you want to engage. To see a list of the available debugging options, enter? at the prompt.

每个命令都由一个字母表示,如X、L或M。输入与要接合的选项对应的字母。要查看可用调试选项的列表,请输入?在提示符下。

To enable the PeopleCode debugger for Application Engine:

要为应用程序引擎启用PeopleCode调试器,请执行以下操作:

  1. Sign on to PeopleTools using the same user ID that you will use to invoke the Application Engine program.

使用您将用于调用应用程序引擎程序的相同用户ID登录到PeopleTools。

  1. Open Application Designer.

打开应用程序设计器。

  1. Select Debug, PeopleCode Debugger Mode.

选择Debug,PeopleCode调试器模式。

Your Application Engine program can be open on the desktop, but you do not need to open the Application Engine program or the PeopleCode action that you want to debug.

可以在桌面上打开应用程序引擎程序,但不需要打开要调试的应用程序引擎程序或PeopleCode操作。

  1. Select Debug, Break at Start.

选择“调试”,“在开始时断开”。

This command will cause the Application Engine program to break before executing any PeopleCode programs within it.

该命令将导致应用程序引擎程序在执行其中的任何PeopleCode程序之前中断。

Setting Debugging Options
设置调试选项

Each debugger option is represented by a single letter that you specify at the prompt. To engage the option you select, press  Enter.

每个调试器选项由您在提示符处指定的单个字母表示。要启用所选选项,请按Enter。

Debugging Tips

调试提示

Become familiar with these tips about debugging programs:

熟悉这些调试程序的技巧:

  • In some cases, such as when setting breakpoints or watch fields, submenus offer additional options.
  • 在某些情况下,例如设置断点或监视字段时,子菜单会提供额外的选项。

After you are familiar with the commands, you can enter multiple items on the command line to combine commands and bypass the submenus. For example, to see a list of the breakpoints, you could enter B L.

在熟悉了这些命令之后,可以在命令行中输入多个项来组合命令并绕过子菜单。例如,要查看断点列表,可以输入BL。

To set a field as a watch field, you could enter W S MY_FIELD.

要将字段设置为监视字段,您可以输入W S MY_FIELD。

To set a field as a watch field on a different state record, enter W S MY_AET.MY_FIELD.

要将字段设置为其他状态记录上的监视字段,请输入W S MY_AET.MY_FIELD。

Note: The exception to this option is Modify, which always displays the current value and then prompts you to enter a new value. You can, however, enter M MY_AET.MY_FIELD to go directly to the new value prompt.

附注:此选项的例外是“修改”,它始终显示当前值,然后提示您输入新值。但是,您可以输入M MY_AET.MY_FIELD直接转到新的值提示符。

  • Letter commands are not case-sensitive.
  • 字母命令不区分大小写。

For example, Q and q are valid commands.

例如,Q和q是有效的命令。

Debugging Options

Option

Description

Quit

Enter Q. This option performs a rollback on the current unit of work in the debugging run, and it ends the debugging session.

 It effectively terminates your Application Engine program.

Quit is useful for testing restart. Have some work committed and some uncommitted. Then, terminate the program at that point and roll back the pending work. You want to make sure the program restarts from the point of the last successful commit.

Exit

This option is valid only after one step has completed and another has not already begun. It is not valid once you reach the action level.

Use this option as an alternative to Quit. Exit ends the program run and the debugging session, but it also commits the current unit of that the program has already completed. This option can be helpful when testing your restart logic.

Commit

Enter C to commit the current unit of work in your program.  This option is valid only after a step has completed and before another begins. It is not valid after you reach the action level.

You can use this option, for example, to use your database query tool to check the data in your database.

Break

Enter B to set a breakpoint. When the program reaches the breakpoint, it temporarily halts execution to enable you to observe the state of the current process.

Breakpoint options include:

Set: Enter S to set a breakpoint location.

The breakpoint location appears by default at the current location in the program, but you can specify other sections or steps by overriding the default values that appear in brackets.

Unset: Enter U to remove breakpoints previously set.

List: Enter L to list breakpoints. When you enter this command, make sure that you have entered B first to specify the break option. If you enter L from the main command prompt, you engage the Look option.

Option

Description

Look

Enter L to observe the values currently in the state record associated with the program you are debugging. You must specify the state record at the Record Name prompt. By default, the default state record as specified in your program properties appears in brackets.

You can also specify a specific field name on the state record in the Field Name prompt. To look at all the fields in the state record, leave the asterisk (*) within the brackets unchanged.

Modify

Enter M to modify the value of a state record value for debugging purposes. Suppose the previous steps did not set a value correctly but you want to see how the rest of the program would perform if the appropriate value existed in the state record. This option enables you to help your program in the debugging or testing phase.

As with the Look command, you must specify the appropriate state record (if you are using multiple state records), and you must specify one field. You can modify only one field at time.

Watch

Enter W to specify a field as a watch field. The program stops when the field value changes.

Similar to the Break command, you can specify options for Set, Unset, and List.

Step Over

Enter S to run the current step to completion and stop at the next step in the current section.

The behavior depends on the current level or the program.  You start at the step level, and then can step into the action level. If you are at the step level and use step over, you go to the next step in the current section, skipping over all actions (including any call sections). If you are at the action level, step over executes the current action and stops at the next action in the current step, or at the next step in the current section.

Option

Description

Step Into

Enter I to observe a step or called section in more detail. For instance, you can check each SQL statement and stop. By using this option and checking the state record at each stop,  you can easily isolate problem SQL or PeopleCode.

As with Step Over, the behavior depends on the level. At the step level, you can step into the action level and stop before the first action in the step. At the action level, if the current action is a call section, this option takes you to the first step in the called section. For other action types, this option acts the same as the Step Over option because no deeper level exists in which to step.

Step Out of

Liz Enter O. After you’ve stepped into a step or called section,  use the Step Out of option to run the rest of the current step or called section and stop. As with the previous step options,  the behavior of Step Out of depends on the current level of the program.

At the step level, Step Out of completes the remaining steps in the current section, returns to the calling section or step, and stops at the next action in that step. If the section is MAIN and is not called by another section or step, then Step Out of behaves the same as the Go option.

At the action level, Step Out of completes the current step and stops at the next step in the current section, or if the program is at the end of a section, Step Out of returns to the calling section or step.

Go

Enter G. After the program has stopped at a specific location,  and you’ve examined its current state, you can use the Go command to resume the execution of the program. This is a helpful command when you have breakpoints set. With this command, the program won’t stop at a step or action; it only stops at the next breakpoint or watch field, or when the program runs to completion.

Run to commit

Enter R. Resumes execution of your program after it has stopped. This command forces the program to stop again after the next commit. This is a good option to use when observing your commit strategy and how it will affect a restart.

Example of the Look Option

外观选项的示例

To view the value stored in a specific field of the state record after a step or action, enter the appropriate field name at the Field Name prompt. For example, if you entered AE_TESTAPPL_AET at the Record Name prompt and AE_INT_6 at the Field Name prompt, you would see the value of the AE_INT_6 field in the AE_TESTAPPL_AET record.

要在步骤或操作之后查看存储在状态记录的特定字段中的值,请在Field Name提示符处输入适当的字段名。例如,如果您在记录中输入了AE_TESTAPPL_AET名称提示符和AE_INT_6在字段名称提示符下,您将在AE_TESTAPPL_AET记录中看到AE_INT_6字段的值。

You can also use an asterisk (*) as a wildcard to get a partial list. For example, if you enter AE_INT* at the Field Name prompt, you see only the fields that start with AE_INT; this is also true for the Record Name prompt. This feature is useful for both listing multiple fields across multiple records and as a shortcut. If you know that only one state record starts with XXX, you do not have to type the full name, just type XXX.

您也可以使用星号(*)作为通配符来获取部分列表。例如,如果输入AE_INT*在字段名提示符时,您只看到以AE_INT开头的字段;对于Record Name提示符也是如此。此功能对于列出跨多个记录的多个字段以及作为快捷方式都很有用。如果您知道只有一个状态记录以XXX开头,则不必键入全名,只需键入XXX即可。

Example of the Modify Option

修改选项的示例

If you wanted to set the AE_INT_15 field in the AETESTPROG to 10, you would enter the record (AE_TESTAPPL_AET) at the Record Name prompt and the field (AE_INT_15) at the Field Name prompt.

如果你想将AETESTPROG中的AE_INT_15字段设置为10,你可以在记录名称提示符处输入记录(AE_TESTAPPL_AET),在字段名称提示符处输入字段(AE_INT_15)。

Then you would see the current value of the field. At the prompt, you could enter a new value.

然后您将看到该字段的当前值。在提示符下,您可以输入一个新值。

Using the Look command, you can check to see that the value you specified now exists in the state record.

使用Look命令,可以检查指定的值现在是否存在于状态记录中。

Example of the Watch Option

监视选项示例

Enter S to set a watch field. After you enter S, you enter the record name (such as AE_TESTAPPL_AET) and field name (such as AE_INT_7) at the appropriate prompts.

输入S以设置监视字段。输入S后,在适当的提示下输入记录名(如AE_TESTAPPL_AET)和字段名(如AE_INT_7)。

Enter U to unset, or remove, a watch field from the list. After you enter U, you see a list of active watch fields. Enter the watch field ID number to remove a field. For example, if the field AE_INT_7 were second in the watch field list, you would enter 2 to remove it.

输入U可从列表中取消设置或删除监视字段。输入U后,您会看到活动监视字段的列表。输入监视字段ID号以删除字段。例如,如果字段AE_INT_7在监视字段列表中排在第二位,则输入2将其删除。

After a step or action completes, enter L to list, or view, the values of all the fields that you included in the watch list.

完成步骤或动作后,输入L以列出或检视监视清单中包含的所有字段的值。

Note: You cannot set a watch on a long text field.

注意:您不能在长文本字段上设置监视。

这篇关于Debugging Application Engine Programs 调试应用程序引擎程序的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/460360

相关文章

利用Python调试串口的示例代码

《利用Python调试串口的示例代码》在嵌入式开发、物联网设备调试过程中,串口通信是最基础的调试手段本文将带你用Python+ttkbootstrap打造一款高颜值、多功能的串口调试助手,需要的可以了... 目录概述:为什么需要专业的串口调试工具项目架构设计1.1 技术栈选型1.2 关键类说明1.3 线程模

将Java程序打包成EXE文件的实现方式

《将Java程序打包成EXE文件的实现方式》:本文主要介绍将Java程序打包成EXE文件的实现方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录如何将Java程序编程打包成EXE文件1.准备Java程序2.生成JAR包3.选择并安装打包工具4.配置Launch4

Java程序进程起来了但是不打印日志的原因分析

《Java程序进程起来了但是不打印日志的原因分析》:本文主要介绍Java程序进程起来了但是不打印日志的原因分析,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录Java程序进程起来了但是不打印日志的原因1、日志配置问题2、日志文件权限问题3、日志文件路径问题4、程序

SpringBoot实现微信小程序支付功能

《SpringBoot实现微信小程序支付功能》小程序支付功能已成为众多应用的核心需求之一,本文主要介绍了SpringBoot实现微信小程序支付功能,文中通过示例代码介绍的非常详细,对大家的学习或者工作... 目录一、引言二、准备工作(一)微信支付商户平台配置(二)Spring Boot项目搭建(三)配置文件

解决SpringBoot启动报错:Failed to load property source from location 'classpath:/application.yml'

《解决SpringBoot启动报错:Failedtoloadpropertysourcefromlocationclasspath:/application.yml问题》这篇文章主要介绍... 目录在启动SpringBoot项目时报如下错误原因可能是1.yml中语法错误2.yml文件格式是GBK总结在启动S

使用Python自建轻量级的HTTP调试工具

《使用Python自建轻量级的HTTP调试工具》这篇文章主要为大家详细介绍了如何使用Python自建一个轻量级的HTTP调试工具,文中的示例代码讲解详细,感兴趣的小伙伴可以参考一下... 目录一、为什么需要自建工具二、核心功能设计三、技术选型四、分步实现五、进阶优化技巧六、使用示例七、性能对比八、扩展方向建

如何用java对接微信小程序下单后的发货接口

《如何用java对接微信小程序下单后的发货接口》:本文主要介绍在微信小程序后台实现发货通知的步骤,包括获取Access_token、使用RestTemplate调用发货接口、处理AccessTok... 目录配置参数 调用代码获取Access_token调用发货的接口类注意点总结配置参数 首先需要获取Ac

MySQL常见的存储引擎和区别说明

《MySQL常见的存储引擎和区别说明》MySQL支持多种存储引擎,如InnoDB、MyISAM、MEMORY、Archive、CSV和Blackhole,每种引擎有其特点和适用场景,选择存储引擎时需根... 目录mysql常见的存储引擎和区别说明1. InnoDB2. MyISAM3. MEMORY4. A

基于Python开发PDF转Doc格式小程序

《基于Python开发PDF转Doc格式小程序》这篇文章主要为大家详细介绍了如何基于Python开发PDF转Doc格式小程序,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 用python实现PDF转Doc格式小程序以下是一个使用Python实现PDF转DOC格式的GUI程序,采用T

前端bug调试的方法技巧及常见错误

《前端bug调试的方法技巧及常见错误》:本文主要介绍编程中常见的报错和Bug,以及调试的重要性,调试的基本流程是通过缩小范围来定位问题,并给出了推测法、删除代码法、console调试和debugg... 目录调试基本流程调试方法排查bug的两大技巧如何看控制台报错前端常见错误取值调用报错资源引入错误解析错误