How to debug a BSP application (a tutorial)
Are you new to BSP development and wonder how to debug a BSP?
Here is a little Blog that enables you to debug your BSP application.
There are 4 steps you have to do to start the debugger for your BSP:
- Enter your user name in the section “Debugging External Requests” of the Debugger settings in transaction SE80.
- Set a personal break point in your BSP.
- Activate debugging in the transaction SICF.
- Check that the BSP is executed with the user name you entered in step 1 and 3.
Step 1: Enter your user name in the section “Debugging External Requests” of the Debugger settings in transaction SE80.
SE80 -> Utilities -> Settings
ABAP Editor -> Debugging
Step 2: Set a personal break point in your BSP.
Enter a break point to your ABAP code in the BSP. In my test BSP I set the break point in the event OnInitialization.
Don’t forget to activate the code.
Step 3: Activate debugging in the transaction SICF.
Browse to /sap/bc/bsp/sap. In this folder you can find your BSP object.
ℹ exceptional case
If you use a own namespace your BSP objekts are in folder /sap/bc/bsp/<own namespace>.
Mark your BSP object and activate the debugging by Edit -> Debugging -> Activate Debugging
A dialog appears. Fill your user name into the field “user:” and press the “Activate” button.
Step 4: Check that the BSP is executed with the user name you entered in step 1 and 3.
You have entered your user name in step 3. If you want to check this later you can do this by opening the dialog again.
Now you have to check that the BSP-object is executed with your user name. In some cases a developer enter logon data in the SICF in order to force the system to execute with special user context. This you can check by open the entry in transaction SICF.
Now you can start the start the BSP and voila you entered the debugging:
if you need to dig deeper, it is useful to start debugging at point where BSP Framework starts handling the request :
CL_HTTP_EXT_BSP > IF_HTTP_EXTENSION > HANDLE_REQUEST
thanx for the hint!!!