PDA

View Full Version : Debug VFP migrated programs



Gayani
2013-09-10, 03:28
Hi,

Can anyone tell me how to debug the programs which were migrated to Lianja. My migrated project got stuck and I cannot find away to debug it. :(

barrymavin
2013-09-10, 03:37
Ah you finally posted on the forums. Welcome :)

SET DEBUG ON

run your app and the c:\lianja\debug\debug_client.txt file will have an execution trace in it.

In RC9 (which you don't have access to) there is also SET DEBUGTRACE ON which will trace each line executed into c:\lianja\debug\debug.txt which you can look at when it "gets stuck".

You can also.

SET DEBUGOUT ON

and add DEBUGOUT commands in your code in places you think its misbehaving.

You don't mention how you are running this application or whether its old-style prg, scx, vcx or a Lianja App.

barrymavin
2013-09-10, 04:15
In the latest build of RC9 I have added SET DEBUGCOMPILE ON|OFF which causes the compiler to include debugging information in the compiled code file. When trying to track down "hard to find" bugs, issue SET DEBUG ON in the console, run your app and the c:\lianja\debug\debug.txt file will contain a complete execution trace history with the source code of the lines executed. This file can get quite large but nevertheless is helpful. before running your app delete all object files. After debugging remember to SET DEBUGCOMPILE OFF and remove the object files so that they get regenerated.

Gayani
2013-09-10, 05:48
Yes, u guide me to do the above on one of my tickets. I did so. But nothing on the debug.txt. That is y I got stuck. Program got 'not responded' and when I close it Lianja close itself.

I run the prg is as follows,
----------
Set Debug On
do PtMain.prg
------------

I will send my program in a ticket.

barrymavin
2013-09-10, 06:03
Yes, u guide me to do the above on one of my tickets. I did so. But nothing on the debug.txt. That is y I got stuck. Program got 'not responded' and when I close it Lianja close itself.

I run the prg is as follows,
----------
Set Debug On
do PtMain.prg
------------

I will send my program in a ticket.

Ok thats good.

This may run in RC9 which we use internally. We will take a look at it.

Gayani
2013-09-11, 01:20
Hi Barry,

I found the place where I got stuck :) . It is the command bellow. This command line is written when migrating the form (It is not there in my scx). Is it wrong? Wht should I do to correct it.

---------------------------------------
set classlib to "newcal" additive
---------------------------------------

avianmanagement
2013-09-11, 01:28
Do you have any objects in the form that are created from a class lib with that name ?

Gayani
2013-09-11, 01:35
yes. I use a grid from that class.

avianmanagement
2013-09-11, 02:06
Make sure you have set classlib to newcal additive before you try to create the form.

Also check any classes in that class library to ensure they are also declared in set lib to xxx additive before setting class lib to newcal

Gayani
2013-09-11, 02:42
of cause I hv done it. It won't work. Y it says "File 'NewCal.cls' does not exist" ? Since the .vcx compiled as .vcp y it search for a .cls I'm confused. :confused:

barrymavin
2013-09-11, 02:52
How are you running the form exactly?

Gayani
2013-09-11, 02:59
I type these on the console

set debug on
do PtMain.prg

Inside the Ptmain it run the form as

DO FORM PtDet WITH '00945 '

barrymavin
2013-09-11, 03:01
It will only look for .cls if you have messed with SET COMPATIBLE TO.

Lianja sets up the file extensions for you when you run it. You don't have to (and should not) change these.

So...

How are you running this form.

DO FORM name

or

DO name

You should use DO FORM name.

barrymavin
2013-09-11, 03:03
I type these on the console

set debug on
do PtMain.prg

Inside the Ptmain it run the form as

DO FORM PtDet WITH '00945 '

Then LIST STATUS and see how what compatibility is set to.

Gayani
2013-09-11, 05:52
How to put a break point? I just need to know the correct way because I tried putting one and when I run the program it doesn't stop at that place (as on VFP ).

yvonne.milne
2013-09-11, 08:26
Hi Gayani,

Your login now has access to download the latest RC9 beta build in Downloads/Windows/beta. This includes the SET DEBUGTRACE and SET DEBUGCOMPILE commands and the App Inspector debugger functionality as explained in the Roadmap (http://www.lianja.com/resources/roadmap#lianjaappbuilder).

Regards,

Yvonne

Gayani
2013-09-12, 00:02
Hi Yvonne,

In RC9 when I debug the program on console, exe stop working. Pls refer the attachment.

How I run on console
----------------------
Set Debug On
Debug PtMain

448

barrymavin
2013-09-12, 00:08
You have a pre-release of RC9 please submit tickets.

There will be a new build available today with proper integration of the debugger. As I mentioned yesterday this is a work in progress...

Gayani
2013-09-12, 00:11
Ok. I already send a one. Thank u

K!k3
2013-09-24, 11:23
I'm a lot confussed.
I don't know how compile and run my app.

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)

Gayani
2013-09-24, 22:48
I'm a lot confussed.
I don't know how compile and run my app.

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)

In the "Console" type:

Set Debug On - doing this all bugs will write to debug.txt in the \lianja\debug directory

Debug <your_progrm_name>

barrymavin
2013-09-24, 22:55
In the "Console" type:

Set Debug On - doing this all bugs will write to debug.txt in the \lianja\debug directory

Debug <your_progrm_name>

He needs RC9 to use the debugger -- which you have early access to. This will ship this week.

K!k3
2014-04-25, 11:13
If my program file is named "exercise.prg"; then I must use debug excercise.prg?

Like

Set Debug On
Debug excercise.prg
Do excercise.prg

Thanks

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

yvonne.milne
2014-04-25, 12:35
Hi Victor,

You can, or you can load it into the Debugger like this:

660

Regards,

Yvonne

K!k3
2014-05-26, 18:02
696

I have this error message.

Who knows how I can resolve it.

Thanks

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

yvonne.milne
2014-05-27, 05:40
Hi Victor,

As Dave said (http://www.lianja.com/community/showthread.php?1925-Building-desktop-installers-in-v1-1&p=9913&viewfull=1#post9913) the current release is v1.1.2. Please upgrade your Lianja App Builder to the v1.1.2 release. Download the Lianja App Center 1.1.2. Do not install the Lianja App Center, but place the downloaded file in the drive:\lianja\redist\ directory.

Regards,

Yvonne

K!k3
2014-05-28, 17:04
Well, I try and comment again

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

HankFay
2014-05-28, 17:50
Hi Victor,

I've had to edit the line in the template to match the current version, on occasion. Make sure that it's the same as the version you are on (which should be 1.1.2).

Hank

K!k3
2014-10-11, 12:47
Hi Victor,

I've had to edit the line in the template to match the current version, on occasion. Make sure that it's the same as the version you are on (which should be 1.1.2).

Hank

Thanks all.

Hank, how can I "set" or "assign" which is the main prg vfp script?

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

HankFay
2014-10-11, 14:29
Hi Victor,

that's a great question, because it highlights the difference between importing and migrating.

For my take on the difference between Importing and Migrating, you can take a look at my (very recent <s>) blog post on the subject: https://prosysplus.squarespace.com/our-blog/2014/10/11/import-no-import-to-migrate-yes

hth,

Hank

barrymavin
2014-10-11, 23:23
On your desktop shortcut if all you want to do is bypass the App Center and run a custom application written in Lianja/VFP using the Application Framework.

c:\lianja\bin\lianjaruntime main

By default that will look for the compiled main.dbo file.

You can run PHP, Python or JavaScript Applications just by adding the appropriate file extension.

You can add this shortcut inside your installer with a custom icon and remove the app center desktop shortcut.

K!k3
2014-10-13, 13:58
On your desktop shortcut if all you want to do is bypass the App Center and run a custom application written in Lianja/VFP using the Application Framework.

c:\lianja\bin\lianjaruntime main

By default that will look for the compiled main.dbo file.

You can run PHP, Python or JavaScript Applications just by adding the appropriate file extension.

You can add this shortcut inside your installer with a custom icon and remove the app center desktop shortcut.

Well, I can't found this file.

Which directory is storaged?

There are another way to "declare" or "asign" the main prg script?

Thanks again.
Very much.

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

K!k3
2014-10-13, 14:32
Hi Victor,

that's a great question, because it highlights the difference between importing and migrating.

For my take on the difference between Importing and Migrating, you can take a look at my (very recent <s>) blog post on the subject: https://prosysplus.squarespace.com/our-blog/2014/10/11/import-no-import-to-migrate-yes

hth,

Hank

Thank Hank

I understand your idea, but while is "completelly migrated" (or evolved) could be operative app, because Lianja is a great tool, (the best in my personal opinion), and don't stop (or brake) the developer.

I know is possible, since Lianja is almost perfect.

Thanks again
Very Much

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

yvonne.milne
2014-10-14, 04:50
Hi Victor,

For example, I have created an App called 'myapp' and my starting script is called 'start.prg'.

The compiled version of start.prg is start.dbo. When you run the script it will be compiled automatically, or you can use the COMPILE (http://www.lianja.com/doc/index.php/COMPILE) command from the Lianja/VFP command window in the Console workspace.

I Deploy (http://www.lianja.com/doc/index.php/Deploying_to_Local_Directory) my App.

I can modify the Lianja App Center shortcut.

802

I just add the name of my starting script to the Command line (http://www.lianja.com/doc/index.php/Command_Line_Switches) for the Lianja runtime:

C:\lianja\bin\lianjaruntime.exe 'C:\lianja\cloudserver\tenants\public\apps\myapp\s tart.dbo'

803

Now, when I use my shortcut, it will run my 'start' script.

Regards,

Yvonne

K!k3
2014-10-14, 17:31
Thanks again

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

K!k3
2014-10-14, 17:51
Are there any way for COMPILE all prg, o must I complie one-by-one?

Thanks

Victor Navarro
Barranquilla, COLOMBIA
3008102508
ICQ 279 364 380
Face: +573008102508 (http://www.facebook.com/victorenrique.navarrohoyos)
MSN: eres_un_vago@hotmail.com
Mail: eres_un_vago@yahoo.es (mailto:eres_un_vago@yahoo.es)
Whatsapp: +573008102508
Skype: eres_un_vago (skype:eres_un_vago?chat)
PIN: 7A3F5E60

davefoss
2014-10-14, 18:05
Are there any way for COMPILE all prg, o must I complie one-by-one?

Thanks


COMPILE *.prg

barrymavin
2014-10-15, 02:51
This thread contains many questions that have nothing to do with the original forum post. The thread will be closed. If you have further questions please post them in new threads.