vscode-ibmi
vscode-ibmi copied to clipboard
Debug v2 - add "set service entry point" action to *PGM and *SRVPGM
Enhancement: Contribute a "Set Service Entry Point" action to *PGM and *SRVPGM objects. This action will appear in the Object Browser and Project Explorer views.
How it works:
This action will call the ibmidebug.create-service-entry-point-with-prompt command in the IBM i Debug extension. The command supports the following parameters:
hostName: string, userId: string, password: string, defaultSepLocation?: string
Parameter descriptions:
hostName: the remote IBM i host nameuserId: the user profile for setting the SEPpassword: the password for the user profiledefaultSepLocation: The default SEP location is generated from the selected object. The location string is in the following format:libraryName/programName programType/moduleName/procedureNamelibraryName: the library nameprogramName: the program nameprogramType: *PGM for program and *SRVPGM for service programmoduleName: module name, default to *ALLprocedureName: procedure name, default to *ALL
Example:
If the user invokes the "Set Service Entry Point" action on program "MYLIB/MYPGM *PGM", the defaultSepLocation string should be MYLIB/MYPGM *PGM/*ALL/*ALL.
The ibmidebug.create-service-entry-point-with-prompt command implementation brings up a prompt to display the defaultSepLocation. If the user wants to set an SEP on a specific module or procedure, he can specify the module name or procedure name in the location value.
Need a UI to let the user select which module/function they want to break on:
- You can pick a module, which means
*ALLprocedures - You can pick a procedure, which is then explicit
select BOUND_MODULE_LIBRARY, BOUND_MODULE, MODULE_ATTRIBUTE, NUMBER_PROCEDURES from QSYS2.BOUND_MODULE_INFO WHERE Program_Library = 'LIAMA'; --gets module to objects
@mkwan01 I understand that this depends on a new API in the debug client. Can you let us know what branch this is available on so we can have this available once the new Debug Service ships.
@edmundreinhardt The v2 debug client code is in the debug_v2 branch: https://github.ibm.com/ibmi-toronto/debugclient/tree/debug_v2
I am in the process of integrating the debug_v2 branch to head. It should be available in a few days.
The internal startDebug functions needs to support SEP, and instead of calling the startDebugging VS Code API, instead call the IBM i Debug command with the correct attributes.
The DebugOptions interface basically needs additional props for SEP debugging.
const parms = ['hostname', 'userId', 'password', 'sepLocation'];
vscode.commands.executeCommand(`ibmidebug.create-service-entry-point-with-prompt`, ...parms);
We have a question whether we need to pass the SEP daemon port value as a parameter. I reviewed the debug client code and found that it is currently reading the SEP daemon port and secure debug from the global "IBM i Debug" settings. Since Code for i has its own Connection Settings page, the port number values from Code for i may be different than the global debug settings. I will add two more parameters to the ibmidebug.create-service-entry-point-with-prompt command, so that Code for i can pass these port numbers to debug.
Please see the following debug issue for details: https://github.ibm.com/ibmi-toronto/debugclient/issues/22