pct
pct copied to clipboard
PDSOE: replacing r-code
This is not directly a PCT problem, but is IMHO very interesting for PCT users.
There are two place in PDSOE where r-code built by PDSOE seems to be needed:
- debugging client side code
- ALT+L to find debug listing line in source code (Carl's tip in poet-summit today)
Since we replaced the PSDOE AVM compiler with PCT a long time ago, I'm wondering if PDSOE can be "fooled" into using PCT's r-code.
I'll do some tests, and update the ticket if I find anything useful.
Debugging client side code
In order to avoid this message ?
ctrl+L to find debug listing line in source code (Carl's tip in poet-summit today)
What was this tip ? :blush:
I do not let PDSOE create any r-code:
---------------------------
Launch Debugger
---------------------------
Source-level debugging requires saving the r-code.
Please check your compile-project settings.
Enable Debugger cannot be performed at this time.
---------------------------
OK
---------------------------
Sorry I meant ALT+L:
Which results in:
---------------------------
Debug Listing Line Number
---------------------------
Rcode file of the current resource not found.
---------------------------
OK
---------------------------
- Debugger
Unchecking "Save r-code" in Progress OpenEdge -> Build -> Compile menu introduces this behavior, and it looks like it's hard-coded in the Java code. If you check the box but disable "Build automatically", you can still build with PCT and use the debugger (but it's still possible to force rcode creation, but it's probably not what you want to do). AFAIK, there's no other solution
- Debug listing line number
In a very simple project, I'm able to use Alt + L. Rcode has to be in the exact location where it would be generated by PDSOE (target build directory of source entry, or global directory). Make sure rcode has debug information. Once again, I did my test on a very simple environment.
Debugger
That works rather nicely! What a breath of fresh air to step through source with the Eclipse debugger instead of the stand alone debugger.
Debug listing line number
This nearly works, for some reason include files are not automatically found, this may be related to relative paths, or something else:
After manually selecting the include file, the correct line is highlighted!
It looks like relative paths (even valid ones in the context of the project) are not correctly understood by PDSOE. Maybe an enhancement request for Progress. You can also try using relativePaths="false" in your PCTCompile statement. RCode will be generated with absolute references to include files, so they might be understood by PDSOE. Only use this option for local builds, any CI build should use relativePaths=true.
The debugger is not working as well as I had hoped, the notion of include files seems a bit lost on the debugger, a breakpoint in source.p in project A results in the debugger stopping at that line in the debug-listing of source.p, ie at a completely different line.
The initial results were beyond my expectations, so I am encouraged to experiment a little more in this area.
Make sure you recompile all rcode with relativePaths="false". Once again, I've tried that on a very simple project, but I've been able to compile with PCT and use breakpoints in the debugger, even within include files. The debugger always pointed at the right location in the code.
I have just performed a clean build with relativePaths false without success.
Maybe it is related to having multiple projects.
I am starting a debug configuration in project A (ui only) with a breakpoint in project B (back end). Project A is unaware of project B.
Line breakpoint in .p of project B:
Debugger showing line 67 of .p - which is debug-listing line 67, ie one of the lines from an include before line 67 of the .p:
My work on this topic is a bit far away, but I didn't find any way on how to solve this issue. Unless additional info can be provided, this issue won't be fixed.