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

相关文章

Django调用外部Python程序的完整项目实战

《Django调用外部Python程序的完整项目实战》Django是一个强大的PythonWeb框架,它的设计理念简洁优雅,:本文主要介绍Django调用外部Python程序的完整项目实战,文中通... 目录一、为什么 Django 需要调用外部 python 程序二、三种常见的调用方式方式 1:直接 im

Mysql 驱动程序的程序小结

《Mysql驱动程序的程序小结》MySQL驱动程序是连接应用程序与MySQL数据库的重要组件,根据不同的编程语言和应用场景,MySQL提供了多种驱动程序,下面就来详细的了解一下驱动程序,感兴趣的可以... 目录一、mysql 驱动程序的概念二、常见的 MySQL 驱动程序1. MySQL Connector

java程序远程debug原理与配置全过程

《java程序远程debug原理与配置全过程》文章介绍了Java远程调试的JPDA体系,包含JVMTI监控JVM、JDWP传输调试命令、JDI提供调试接口,通过-Xdebug、-Xrunjdwp参数配... 目录背景组成模块间联系IBM对三个模块的详细介绍编程使用总结背景日常工作中,每个程序员都会遇到bu

Java服务实现开启Debug远程调试

《Java服务实现开启Debug远程调试》文章介绍如何通过JVM参数开启Java服务远程调试,便于在线上排查问题,在IDEA中配置客户端连接,实现无需频繁部署的调试,提升效率... 目录一、背景二、相关图示说明三、具体操作步骤1、服务端配置2、客户端配置总结一、背景日常项目中,通常我们的代码都是部署到远程

uni-app小程序项目中实现前端图片压缩实现方式(附详细代码)

《uni-app小程序项目中实现前端图片压缩实现方式(附详细代码)》在uni-app开发中,文件上传和图片处理是很常见的需求,但也经常会遇到各种问题,下面:本文主要介绍uni-app小程序项目中实... 目录方式一:使用<canvas>实现图片压缩(推荐,兼容性好)示例代码(小程序平台):方式二:使用uni

python获取指定名字的程序的文件路径的两种方法

《python获取指定名字的程序的文件路径的两种方法》本文主要介绍了python获取指定名字的程序的文件路径的两种方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要... 最近在做项目,需要用到给定一个程序名字就可以自动获取到这个程序在Windows系统下的绝对路径,以下

JavaScript中的高级调试方法全攻略指南

《JavaScript中的高级调试方法全攻略指南》什么是高级JavaScript调试技巧,它比console.log有何优势,如何使用断点调试定位问题,通过本文,我们将深入解答这些问题,带您从理论到实... 目录观点与案例结合观点1观点2观点3观点4观点5高级调试技巧详解实战案例断点调试:定位变量错误性能分

Python利用PySpark和Kafka实现流处理引擎构建指南

《Python利用PySpark和Kafka实现流处理引擎构建指南》本文将深入解剖基于Python的实时处理黄金组合:Kafka(分布式消息队列)与PySpark(分布式计算引擎)的化学反应,并构建一... 目录引言:数据洪流时代的生存法则第一章 Kafka:数据世界的中央神经系统消息引擎核心设计哲学高吞吐

基于Python编写自动化邮件发送程序(进阶版)

《基于Python编写自动化邮件发送程序(进阶版)》在数字化时代,自动化邮件发送功能已成为企业和个人提升工作效率的重要工具,本文将使用Python编写一个简单的自动化邮件发送程序,希望对大家有所帮助... 目录理解SMTP协议基础配置开发环境构建邮件发送函数核心逻辑实现完整发送流程添加附件支持功能实现htm

C#控制台程序同步调用WebApi实现方式

《C#控制台程序同步调用WebApi实现方式》控制台程序作为Job时,需同步调用WebApi以确保获取返回结果后执行后续操作,否则会引发TaskCanceledException异常,同步处理可避免异... 目录同步调用WebApi方法Cls001类里面的写法总结控制台程序一般当作Job使用,有时候需要控制