Regarding debugging phantoms, we've developed an intercept mechanism so when a phantom is triggered from the VB GUI we capture the parameters and return to VB with an error.
Then, the programmer can restart the phantom code - but running under a normal session - using an entry point routine that picks up the parameters and launches into the appropriate code. This is great for debugging, and also flagging up non-numerics and unassigned variables - these seem to get missed when the code is only ever run as a phantom. Ed -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of David A Barrett Sent: 23 June 2009 21:33 To: [email protected] Subject: [U2] What Program Am I? We've got a UV client/server application with a thick VB client. The vintage is around 1997, and the architecture has a debug mode that I leave on all the time that logs the calls back to the server and the arguments passed back and forth. The server side stuff is all phantomed off, so the output is in the &PH& file. Additionally, you can put display statements in the server side programs and the output from these will be sent to the &PH& record, mingled in with the other stuff. Debugging is old school, as you can't step through programs and any DEBUG statement will halt the server side program with no ability to do interactive I/O, and the client side window will appear hung, requiring the three finger salute. So you spend a lot of time putting in lines of code that look like: DISPLAY "HERE I AM #17" and the like. Eventually I got fed up with counting value marks in &PH& file records and wrote a routine that formats MV data up nicely for display and makes a lot of tedious stuff easier. It makes my life easier. For tricky parts of the system, I often leave the debugging output calls in the programs; in case I need to come back some day and fiddle some more. But there is one thing I'd like to be able to do... It would be super if it were possible to see the call stack from a running program. Kind of like the the UV "T" debugger command. Sometimes I'm just wondering, "How the hell did I get *there*". Or I'll see debugging output in the &PH& file and I wonder, "What program is that from?". In those cases it would be useful to have the call stack sitting beside the output in the &PH& file. Does anybody know a way to do this? I've even considered building a little $INCLUDE snippet that updates @USER1 or a named common area and recompiling ever server side program with it added. Any help will be greatly appreciated. Dave Barrett, Lawyers' Professional Indemnity Company _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users ------------------------------------------------------------------------------------------- Please remember to recycle wherever possible. Reduce, reuse, recycle, think do you need to print this e-mail? ------------------------------------------------------------------------------------------- This e-mail and any attachment(s), is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the addressee, dissemination, copying or use of this e-mail or any of its content is prohibited and may be unlawful. If you are not the intended recipient please inform the sender immediately and destroy the e-mail, any attachment(s) and any copies. All liability for viruses is excluded to the fullest extent permitted by law. It is your responsibility to scan or otherwise check this email and any attachment(s). Unless otherwise stated (i) views expressed in this message are those of the individual sender (ii) no contract may be construed by this e-mail. Emails may be monitored and you are taken to consent to this monitoring. Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 01628868 Both companies are registered in England and Wales and each has its registered office at 2 Burston Road, Putney, London, SW15 6AR. ------------------------------------------------------------------------------------------- _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
