You are on page 1of 26

Infor LN / Baan

Tools

Debugging the
Bshell
Quick Guide

Copyright © 2017 Infor. All rights reserved. The word and design marks set forth herein are trademarks and/or
registered trademarks of Infor and/or related affiliates and subsidiaries. All other trademarks listed herein are
the property of their respective owners. www.infor.com.
LN Tools Debugging the Bshell

Copyright © 2017 Infor

Important Notices
The material contained in this publication (including any supplementary information) constitutes
and contains confidential and proprietary information of Infor.

By gaining access to the attached, you acknowledge and agree that the material (including any
modification, translation or adaptation of the material) and all copyright, trade secrets and all other
right, title and interest therein, are the sole property of Infor and that you shall not gain right, title or
interest in the material (including any modification, translation or adaptation of the material) by
virtue of your review thereof other than the non-exclusive right to use the material solely in
connection with and the furtherance of your license and use of software made available to your
company from Infor pursuant to a separate agreement, the terms of which separate agreement
shall govern your use of this material and all supplemental related materials ("Purpose").

In addition, by accessing the enclosed material, you acknowledge and agree that you are required
to maintain such material in strict confidence and that your use of such material is limited to the
Purpose described above. Although Infor has taken due care to ensure that the material included in
this publication is accurate and complete, Infor cannot warrant that the information contained in this
publication is complete, does not contain typographical or other errors, or will meet your specific
requirements. As such, Infor does not assume and hereby disclaims all liability, consequential or
otherwise, for any loss or damage to any person or entity which is caused by or relates to errors or
omissions in this publication (including any supplementary information), whether such errors or
omissions result from negligence, accident or any other cause.

Without limitation, U.S. export control laws and other applicable export and import laws govern
your use of this material and you will neither export or re-export, directly or indirectly, this material
nor any related materials or supplemental information in violation of such laws, or use such
materials for any purpose prohibited by such laws.

Trademark Acknowledgements
The word and design marks set forth herein are trademarks and/or registered trademarks of Infor
and/or related affiliates and subsidiaries. All rights reserved. All other company, product, trade or
service names referenced may be registered trademarks or trademarks of their respective owners.

Publication Information
Version 2.0
Change log Changed overall document layout.
Added instructions for LN UI 11 and 12.
Added options for generation of Bshell log.
Publication date June 5, 2017

2
LN Tools Debugging the Bshell

Table of Contents

Overview ....................................................................................................................... 4

LN UI .............................................................................................................................. 5

LN and Baan 5.0 WebUI ............................................................................................... 10

LN and Baan 5.0 Worktop or BW ................................................................................ 17

Additional Settings Information .................................................................................. 24

3
LN Tools Debugging the Bshell

Overview
This guide will direct you in the steps necessary to run a debug on the Bshell and create a log file.

Important
This process has the potential to generate a very large log file, so it is advised to limit any
extra activity within the Bshell when creating the log.

Note: Debugging the Bshell is not advised when large amounts of records are read and
processed (e.g., Running MRP), as the log file created could reach several GBs in size.

Important
For the best results, you should log out of LN completely, and then log back in before
following the steps included in the section corresponding to your UI.

4
LN Tools Debugging the Bshell

LN UI

1 Open session ‘Run time debugging of Bshell’ (ttstpbshdebug)

First, open session ‘Run time debugging of Bshell’ (ttstpbshdebug).

For LN UI 11.x (figure 1, below),


1. Select ‘Options’ (which may be under ‘More...’) from the top bar.
2. Click option ‘Debug Bshell’.

Figure 1. ‘Debug Bshell’ in LN UI 11.x.

For LN UI 12.x (figure 2, right),


1. Select ‘Options’ from the sidebar.
2. Click option ‘DebugBshell’.

The session may be under the ‘Recently Used’ thumbnail


view, as shown in both figures.

Another option would be to execute ‘Run Program’ (figure


3, below), which can also be accessed under ‘Options’ in
the top/side bar or using the keyboard shortcut ‘g’ + ‘r’.
Enter session code ‘ttstpbshdebug’ in the text box and
click OK.

Figure 3. ‘Run Program’. Figure 2. ‘Debug Bshell’ in LN UI 12.x.

5
LN Tools Debugging the Bshell

2 Select the General Options

The session will open with tab ‘General Options’ under focus (figure 4, below). The following
steps must be performed in the correct order or the Bshell may close unexpectedly.
1. Set the ‘Trace Level’ to ‘1 - Some Details’.
2. Select the ‘Keep trace file after exit’ checkbox. The checkbox will gray out automatically.
3. Select the ‘Add Time stamps’ checkbox.
4. Note the ‘Log name’ field. This is the file that you will need to upload to the incident, as this is
where the logged information will be stored.
5. Select the ‘Log messages to trace’ checkbox.
6. Select the ‘Bshell messages to trace’ checkbox.

Important
DO NOT PRESS OK at this point.

1
5
6

2
3
4

Figure 4. ‘General Options’.

6
LN Tools Debugging the Bshell

3 Select the Bshell Debug Levels

Select the ‘Bshell Debug Levels’ tab (figure 5, below).


1. Select the ‘Debug Functions’ checkbox.
2. Select the ‘Debug Cpu’ checkbox.
3. Select the ‘Program Flow’ checkbox.
4. Select the ‘Show object information’ checkbox.

Important
DO NOT PRESS OK at this point.

1 4
2

Figure 5. ‘Bshell Debug Levels’.

7
LN Tools Debugging the Bshell

4 Select BDB/SQL Tracing

Select the ‘BDB/SQL Tracing’ tab (figure 6, below).


1. Select the ‘Internal SQL functions’ checkbox. The SQL_TRACE value will change from 00 to
02000 automatically.
2. Select the ‘Database Actions’ checkbox. The BDB_DEBUG value will change from 00 to 02
automatically.
3. If there is an error with locking issues, select the ‘Delayed Locks’ checkbox. The
BDB_DEBUG value will change from 02 to 06 automatically.
4. Select the ‘References’ checkbox. If ‘Delayed Locks’ was selected, the BDB_DEBUG value
will change from 06 to 016 automatically. If not, the value will change from 02 to 012.

Important
Before clicking OK, select any additional settings requested by your Support analyst in
this tab or any other previous tabs of the session.

5. Click OK.

1
2
3
4

Figure 6. ‘BDB/SQL Tracing’.

Important
The Debug Bshell is now running and logging everything that is done from within this
Bshell. At this point you should limit any unnecessary activities.

8
LN Tools Debugging the Bshell

5 Reproduce Issue

Run/finish running the session(s) in question, as instructed by the Support analyst. If applicable,
recreate any errors.

6 Exit LN

Exit LN by either quitting the browser or logging out of Infor Ming.le, depending on your
environment. This action will clear all settings set above to disable logging and return to normal
operation.

7 Retrieve Log File

If you have an on-premise installation,


1. Access your LN server.
2. Obtain the Bshell log file from the directory specified in the Log name field, as noted in step 2
of this section.
3. Compress the file.
4. Upload the file to the incident in Infor Xtreme.

If you have a Cloud installation,


1. Access the File Manager, under Tools > Device Management in the sidebar.
2. Obtain the Bshell log file from the directory specified in the Log name field, as noted in step 2
of this section.
3. Compress the file.
4. Upload the file to the incident in Infor Xtreme.

Important
Compress the Bshell log file using 7zip or the compression software of your choice before
uploading the file to the incident in Infor Xtreme. Since it is just a text file, it can be compressed
up to 80%, making upload to Xtreme faster.

Note: The File Manager in Cloud environments includes a ‘Compress To’ option under the
‘Actions’ menu. Make sure you compress the file before downloading.

9
LN Tools Debugging the Bshell

LN and Baan 5.0 WebUI

1 Open session ‘Run time debugging of Bshell’ (ttstpbshdebug)

First, open session ‘Run time debugging of Bshell’ (ttstpbshdebug) (figure 7, below).

1. Select ‘Options’ from the menu bar.


2. Mouse over ‘Infor LN Options’/’Infor ERP Options’.
3. Click ‘Debug Bshell’.

Figure 7. ‘Debug Bshell’ in WebUI.

Another option would be to execute ‘Run Program’ (figure 8, below), which can be accessed
under ‘Tools’ in the menu bar or using the keyboard shortcut ‘Alt’ + ‘F5’. Enter session code
‘ttstpbshdebug’ in the text box and click OK.

Figure 8. ‘Run Program’.

10
LN Tools Debugging the Bshell

2 [LN] Select the General Options

If you have Baan 5.0, skip to step 5


The session will open with tab ‘General Options’ under focus (figure 9, below). The following
steps must be performed in the correct order or the Bshell may close unexpectedly.
1. Set the ‘Trace Level’ to ‘1 - Some Details’.
2. Select the ‘Keep trace file after exit’ checkbox. The checkbox will gray out automatically.
3. Select the ‘Add Time stamps’ checkbox.
4. Note the ‘Log name’ field. This is the file that you will need to upload to the incident, as this is
where the logged information will be stored.
5. Select the ‘Log messages to trace’ checkbox.
6. Select the ‘Bshell messages to trace’ checkbox.

Important
DO NOT PRESS OK at this point.

1
5
6

2
3
4

Figure 9. ‘General Options’.

11
LN Tools Debugging the Bshell

3 [LN] Select the Bshell Debug Levels

Select the ‘Bshell Debug Levels’ tab (figure 10, below).


1. Select the ‘Debug Functions’ checkbox.
2. Select the ‘Debug Cpu’ checkbox.
3. Select the ‘Program Flow’ checkbox.
4. Select the ‘Show object information’ checkbox.

Important
DO NOT PRESS OK at this point.

1 4
2

Figure 10. ‘Bshell Debug Levels’.

12
LN Tools Debugging the Bshell

4 [LN] Select BDB/SQL Tracing

Select the ‘BDB/SQL Tracing’ tab (figure 11, below).


1. Select the ‘Internal SQL functions’ checkbox. The SQL_TRACE value will change from 00 to
02000 automatically.
2. Select the ‘Database Actions’ checkbox. The BDB_DEBUG value will change from 00 to 02
automatically.
3. If there is an error with locking issues, select the ‘Delayed Locks’ checkbox. The
BDB_DEBUG value will change from 02 to 06 automatically.
4. Select the ‘References’ checkbox. If ‘Delayed Locks’ was selected, the BDB_DEBUG value
will change from 06 to 016 automatically. If not, the value will change from 02 to 012.

Important
Before clicking OK, select any additional settings requested by your Support analyst in
this tab or any other previous tabs of the session.

5. Click OK.

1
2
3
4

Figure 11. ‘BDB/SQL Tracing’.

Important
The Debug Bshell is now running and logging everything that is done from within this
Bshell. At this point you should limit any unnecessary activities.

Skip to step 7 for further information

13
LN Tools Debugging the Bshell

5 [Baan 5.0] Select Bshell Debug Levels

The session will open with tab ‘Bshell Debug Levels’ under focus (figure 12, below). The
following steps must be performed in the correct order or the Bshell may close unexpectedly.
1. Change the ‘Tracelevel’ field from 0 to 1.
2. Select the ‘Keep log file’ checkbox. The checkbox will gray out automatically.
3. Select the ‘Add Time stamps’ checkbox.
4. Select the ‘Redirect log to stderr’ checkbox.
5. Select the ‘Bshell Message to log’ checkbox.
6. Select the ‘Debug Functions’ checkbox.
7. Select the ‘Debug Cpu’ checkbox.
8. Select the ‘Program Flow’ checkbox.
9. Select the ‘Show object information’ checkbox.
10.Note the ‘Log name’ field. This is the file that you will need to upload to the incident, as this is
where the logged information will be stored.

Important
DO NOT PRESS OK at this point.

6 9
7

2
3
1 4
5

10

Figure 12. ‘Bshell Debug Levels’.

14
LN Tools Debugging the Bshell

6 [Baan 5.0] Select BDB/SQL Tracing

Select the ‘BDB/SQL Tracing’ tab (figure 13, below).


1. Select the ‘Internal SQL functions’ checkbox. The TT_SQL_TRACE value will change from
00 to 02000 automatically.
2. Select the ‘Database Actions’ checkbox. The BDB_DEBUG value will change from 00 to 02
automatically.
3. If there is an error with locking issues, select the ‘Delayed Locks’ checkbox. The
BDB_DEBUG value will change from 02 to 06 automatically.
4. Select the ‘References’ checkbox. If ‘Delayed Locks’ was selected, the BDB_DEBUG value
will change from 06 to 016 automatically. If not, the value will change from 02 to 012.

Important
Before clicking Close, select any additional settings requested by your Support analyst in
this tab or any other previous tabs of the session.

5. Click OK.

2
3 1
4

Figure 13. ‘BDB/SQL Tracing’.

Important
The Debug Bshell is now running and logging everything that is done from within this
Bshell. At this point you should limit any unnecessary activities.

15
LN Tools Debugging the Bshell

7 Reproduce Issue

Run/finish running the session(s) in question, as instructed by the Support analyst. If applicable,
recreate any errors.

8 Exit LN/Baan

Exit LN/Baan using the Sign Out button in the upper right corner. This action will clear all settings
set above to disable logging and return to normal operation.

9 Retrieve Log File

1. Access your LN/Baan server.


2. Obtain the Bshell log file from the directory specified in the Log name field, as noted in step 2
of this section.
3. Compress the file.
4. Upload the file to the incident in Infor Xtreme.

Important
Compress the Bshell log file using 7zip or the compression software of your choice before
uploading the file to the incident in Infor Xtreme. Since it is just a text file, it can be compressed
up to 80%, making upload to Xtreme faster.

16
LN Tools Debugging the Bshell

LN and Baan 5.0 Worktop or BW

1 Open session ‘Run time debugging of Bshell’ (ttstpbshdebug)

First, open session ‘Run time debugging of Bshell’ (ttstpbshdebug) (figure 14, below).

1. Right click the Infor icon in the Windows taskbar, located on the lower right corner of your
desktop.
2. Mouse over ‘Debugging/Tracing’.
3. Click ‘Debug Bshell...’.

Figure 14. ‘Debug Bshell’ in Worktop/BW.

Another option would be to execute ‘Run Program’ (figure 15A, below), which can be accessed
under ‘Tools’ in the menu bar. Enter session code ‘ttstpbshdebug’ in the text box and click OK.
In Worktop, you can also enter the session code directly into the toolbar (figure 15B, below).

Figure 15A. ‘Run Program’. Figure 15B. Worktop Toolbar.

17
LN Tools Debugging the Bshell

2 [LN] Select the General Options

If you have Baan 5.0, skip to step 5


The session will open with tab ‘General Options’ under focus (figure 16, below). The following
steps must be performed in the correct order or the Bshell may close unexpectedly.
1. Set the ‘Trace Level’ to ‘1 - Some Details’.
2. Select the ‘Keep trace file after exit’ checkbox. The checkbox will gray out automatically.
3. Select the ‘Add Time stamps’ checkbox.
4. Note the ‘Log name’ field. This is the file that you will need to upload to the incident, as this is
where the logged information will be stored.
5. Select the ‘Log messages to trace’ checkbox.
6. Select the ‘Bshell messages to trace’ checkbox.

Important
DO NOT PRESS OK at this point.

1
5
6

2
3
4

Figure 16. ‘General Options’.

18
LN Tools Debugging the Bshell

3 [LN] Select the Bshell Debug Levels

Select the ‘Bshell Debug Levels’ tab (figure 17, below).


1. Select the ‘Debug Functions’ checkbox.
2. Select the ‘Debug Cpu’ checkbox.
3. Select the ‘Program Flow’ checkbox.
4. Select the ‘Show object information’ checkbox.

Important
DO NOT PRESS OK at this point.

1 4
2

Figure 17. ‘Bshell Debug Levels’.

19
LN Tools Debugging the Bshell

4 [LN] Select BDB/SQL Tracing

Select the ‘BDB/SQL Tracing’ tab (figure 18, below).


1. Select the ‘Internal SQL functions’ checkbox. The SQL_TRACE value will change from 00 to
02000 automatically.
2. Select the ‘Database Actions’ checkbox. The BDB_DEBUG value will change from 00 to 02
automatically.
3. If there is an error with locking issues, select the ‘Delayed Locks’ checkbox. The
BDB_DEBUG value will change from 02 to 06 automatically.
4. Select the ‘References’ checkbox. If ‘Delayed Locks’ was selected, the BDB_DEBUG value
will change from 06 to 016 automatically. If not, the value will change from 02 to 012.

Important
Before clicking OK, select any additional settings requested by your Support analyst in
this tab or any other previous tabs of the session.

5. Click OK.

5
1
2
3
4

Figure 18. ‘BDB/SQL Tracing’.

Important
The Debug Bshell is now running and logging everything that is done from within this
Bshell. At this point you should limit any unnecessary activities.

Skip to step 7 for further information

20
LN Tools Debugging the Bshell

5 [Baan 5.0] Select Bshell Debug Levels

The session will open with tab ‘Bshell Debug Levels’ under focus (figure 19, below). The
following steps must be performed in the correct order or the Bshell may close unexpectedly.
1. Change the ‘Tracelevel’ field from 0 to 1.
2. Select the ‘Keep log file’ checkbox. The checkbox will gray out automatically.
3. Select the ‘Add Time stamps’ checkbox.
4. Select the ‘Redirect log to stderr’ checkbox.
5. Select the ‘Bshell Message to log’ checkbox.
6. Select the ‘Debug Functions’ checkbox.
7. Select the ‘Debug Cpu’ checkbox.
8. Select the ‘Program Flow’ checkbox.
9. Select the ‘Show object information’ checkbox.
10.Note the ‘Log name’ field. This is the file that you will need to upload to the incident, as this is
where the logged information will be stored.

Important
DO NOT PRESS OK at this point.

6 9
7

2
3
4
5

1
10

Figure 19. ‘Bshell Debug Levels’.

21
LN Tools Debugging the Bshell

6 [Baan 5.0] Select BDB/SQL Tracing

Select the ‘BDB/SQL Tracing’ tab (figure 13, below).


1. Select the ‘Internal SQL functions’ checkbox. The TT_SQL_TRACE value will change from
00 to 02000 automatically.
2. Select the ‘Database Actions’ checkbox. The BDB_DEBUG value will change from 00 to 02
automatically.
3. If there is an error with locking issues, select the ‘Delayed Locks’ checkbox. The
BDB_DEBUG value will change from 02 to 06 automatically.
4. Select the ‘References’ checkbox. If ‘Delayed Locks’ was selected, the BDB_DEBUG value
will change from 06 to 016 automatically. If not, the value will change from 02 to 012.

Important
Before clicking Close, select any additional settings requested by your Support analyst in
this tab or any other previous tabs of the session.

5. Click Close.

5
2
3 1
4

Figure 20. ‘BDB/SQL Tracing’.

Important
The Debug Bshell is now running and logging everything that is done from within this
Bshell. At this point you should limit any unnecessary activities.

22
LN Tools Debugging the Bshell

7 Reproduce Issue

Run/finish running the session(s) in question, as instructed by the Support analyst. If applicable,
recreate any errors.

8 Exit LN/Baan

Exit LN/Baan using the Sign Out button in the upper right corner. This action will clear all settings
set above to disable logging and return to normal operation.

9 Retrieve Log File

1. Access your LN/Baan server.


2. Obtain the Bshell log file from the directory specified in the Log name field, as noted in step 2
of this section.
3. Compress the file.
4. Upload the file to the incident in Infor Xtreme.

Important
Compress the Bshell log file using 7zip or the compression software of your choice before
uploading the file to the incident in Infor Xtreme. Since it is just a text file, it can be compressed
up to 80%, making upload to Xtreme faster.

23
LN Tools Debugging the Bshell

Additional Settings Information


This sections contains descriptions of most settings that can be used with Debug Bshell. The fields
with titles in orange and checked in the session figures are more commonly used. The others fields
are optional.

3
1
2

4
5
6

1. Log messages to trace: This selection will add any “log” errors (errors that go into the
Log.Bshell or the Event Viewer) directly into the Debug Bshell. This will allow us to have all
the data in one place rather than having to ask for additional Log.Bshell or Event Viewer
messages.

2. Bshell messages to trace: This selection will add the Bshell messages that display on the
screen and add them to the trace file.

3. Trace level: This is a very important field. Please note that this field may be a field in
previous versions instead of a radio button, where you have to enter a value from 0 – 3. In
some even older versions, this selection may not even be on the form, in which case the
TRACELEVEL=1 will have to be added to the bwconfig in order to log a proper Bshell. In
most cases the option 1 is all that is needed. In other cases, the value of 3 gives too much
detail and the important pieces may get missed.

4. Keep trace file after exit: Selecting this checkbox ensures that the log file will not be
deleted. If this is not selected, then the Debug Bshell file will be deleted when the user exits
the Bshell.

5. Add time stamps: This selection adds a timestamp to most lines written to the log file.
This is useful when there is a performance issue or if the log.bshell has a message in it. In
which case we can match up the time stamps to the fraction of a second when the error
occurred.

24
LN Tools Debugging the Bshell

7 10
8

11
12

7. Debug Functions: This option should always be selected. This checkbox logs all Bshell
functions that are used and it must be used in conjunction with the Debug Cpu function in
order to work properly. With this option selected (along with the Debug Cpu option), we are
able look further into what happens within each function. When it is not selected, we can
only see that a function was called.

8. Debug Cpu: This is used in conjunction with ‘Debug Functions’ listed above. This option
utilizes the Debug version of the Cpu so that the proper logging of the functions and other
options can take place. If this is unchecked, we cannot see the full information from the
other functions.

9. Program flow: This option displays each of the application/tools functions that are called.
Each of these functions has its own depth level and allows us to see at what point within
the program certain options / functions are taking place.

10. Show Object Information: This option displays the header information for all objects that
are opened while the Debug Bshell is active. This can be useful to verify the patch level or
determine if an object is customized. However, the Debug Bshell is usually activated mid-
way through a process, when many of the objects have already been opened and loaded
into memory.

11. Show opened files: This is an option to show files that are successfully opened. These are
external files that are only useful for EDI and other such processes that use external files.

12. Debug file access: This logs more information than “Show opened files”. This option
displays files to be accessed, where they appear, and if any errors were received (e.g., 2-
file does not exist or 13-permission not correct).

25
LN Tools Debugging the Bshell

13
14
15
16

17

13. Internal SQL functions: This is a very useful option. Many times if this option is not
selected, the query is cut off in the log. This option not only shows us the query, but also
the full set of data that is returned. It will also show the bind values. This option should be
used with any Bshell logs that are created.

14. Database Actions: This option logs inserts, updates, deletes, commits, and aborts. This
option should be used with any Bshell logs that are created.

15. Delayed Locks: This is an optional selection. If there is an error with locking issues
(Record changed after delayed lock, Record not locked, etc), then this checkbox should be
selected. It will show when locks are placed and removed from records.

16. References: This selection, when used with the other options, will log the reference
information between tables. This is useful with 205, 606, 605 errors, etc. There are no ill
effects of having this checked, and therefore should be done all of the time to limit having
to ask for a new Bshell with it checked.

17. Show BDB Actions: This option is similar to Database Actions. This will log LN Database
activities initiated from the Bshell (e.g., inserting or deleting a record).

26

You might also like