Hello,
I have kubuntu 13.10 x64, fpc & lazarus last svn. My application work without problem on linux but, crosscompiled to win and test in win8, one form has a bug, application freezing without error, I need to debug it. I dont wanna install all fpc lazarus and other component there too. win8 on virtualbox, How to debug ? IDE and fpc in kubuntu, application on w8, w8 in virtualbox
Thank you
Mailing lists / lazarus / 2014-04
how to debug from virtualbox
13 messages · 7 people · –
- FFreeMan 5
- MMartin Frb 2
- RReinier Olislagers 2
- BBart 1
- DDave Coventry 1
- GGraeme Geldenhuys 1
- +1 more
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
FreeMan wrote 8 lines
You have saved it? To your Virtualbox vdi?
I get these kind of errors if I compile the project from my shared folders on the Linux file system.
Yes, I copied in vbox, and its run in win system. I mean exe file run in win drive not from shared or network. Problem on just one form, others hasnt problem.
28-04-2014 13:53 tarihinde, Dave Coventry yazd?:
Show quoted text 12 lines
I have kubuntu 13.10 x64, fpc & lazarus last svn. My application work without problem on…
FreeMan wrote 9 lines
The easy way, install Lazarus on win, in your vbox.
The more complex way, get gdbserver from mingw, install that on win. And see the wiki on remote debug. May also need to google on using gdbserver.
I have kubuntu 13.10 x64, fpc & lazarus last svn. My application work without problem on…
FreeMan wrote 6 lines
I think it's easiest to install FPC+Lazarus on your Windows image even though you said you didn't want to do that.
Alternatively, I suppose you could build with -g -gl and run the application in your image using gdb.exe and manually try to debug things.
I think it's easiest to install FPC+Lazarus on your Windows image even though you said you didn't want to do that. Alternatively, I suppose you could build with -g -gl and run the application in your image using gdb.exe and manually try to debug things.
I don't wanna install fpc or lazarus, 'cos system will change and not be real test system. some dll maybe path maybe settings can be change when install that, and I can not be sure real test.
Can Lazarus remote debug from windows? my real question is this. sorry for my english, I'm still using dictionary.
And my bug, I founded it a few seconds ago, my old classic and "infallible" debug system :) ShowMessage('');when you saw last number, next line has a bug :)
procedure TFRM_.GRD_Enter(Sender: TObject);
begin
ShowMessage('1');
GRD_.ColumnByFieldName('Name').Width :=
GRD_Detail.ColumnByFieldName('Name').Width -4;
ShowMessage('2');
GRD_.BorderStyle := bsSingle;// BUG IS HERE, ON WINDOWS, TRIGGER IT
GRD_Exit and back self again , so endless LOOP starting and application
freezing. in linux work normally
ShowMessage('3');
GRD_.BorderSpacing.Around := 2;
ShowMessage('4');
end;
procedure TFRM_.GRD_Exit(Sender: TObject);
begin
GRD_.BorderStyle := bsNone;
GRD_.BorderSpacing.Around := 0;
GRD_.ColumnByFieldName('Name').Width :=
GRD_Detail.ColumnByFieldName('Name').Width +4;
end;Please, can some test this in windows fpc & IDE?
Thanks for help
FreeMan wrote 11 lines
Yes. But we do not supply the tools. You must download them yourself.
I have never tried via SSH, so I do not know if that works. GdbServer does work on windows.
Having said that, I only tested Window to other Windows. If you do Linux to windows you need to test if your local gdb can open the windows exe for symbols (afaik it needs a copy of the windows exe). Theoretically this should work. Again this kind of gdb stuff, you need to find gdb support / gdb mail list....
You must download it (e.g. from mingw), maybe also download any dll it needs (some versions need dll / It will pop up a notice, if it does).
There are some notes here.
http://wiki.lazarus.freepascal.org/Remote_Debugging
All else google the docs for gdbserver.
Lazarus 1.2 supports this (but likely with some limitations), But 1.3 has improved support.
I don't wanna install fpc or lazarus, 'cos system will change and not be real test…
FreeMan wrote 7 lines
Then clone the image/use differencing hard disks etc.
Alternatively, add another virtual disk, copy over FPC/Lazarus install from e.g. usb stick. Using fpcup also works. Installing from source also works.
Running the installer and not selecting any file associations may also work; I don't think the installer modifies the path but I'm not sure.
Yes. But we do not supply the tools. You must download them yourself. I have never tried…
I understood Martin, I have no much time now for try this, importent for me, find bug & fix it and next form convert from all project. I founded it and I'll fix that by my way, my idea is dbgrid bug it, but need test in windows IDE, I haven't it. so I can't report this is bug. If I do remote debug from linux to windows, I'll write detail on mail list Thank you for all answers
28-04-2014 15:21 tarihinde, Martin Frb yazd?:
Show quoted text 32 lines
I don't wanna install fpc or lazarus, 'cos system will change and not be real test…
FreeMan wrote 11 lines
How are we supposed to do that with only this little piece of code? E.g. what is GRD_ ?
As others have pointed out: the easiest way is to simply install Lazarus on the windows vm en debug it there.
I do so on my Linux VM without any problem whatsoever.
Bart
I don't wanna install fpc or lazarus, 'cos system will change and not be real test…
FreeMan wroteI don't wanna install fpc or lazarus, 'cos system will change and not be real test system.
Take a VirtualBox snapshot of the VM. Install FPC & Lazarus. Debug your app. Once done, restore to the snapshot - it's as if nothing has changed in the VM. I do this all the time when testing installations or trying out new software.
Alternatively, you can use tiOPF's tiLog unit (it can be used stand-alone without using the rest of tiOPF). It gives you console, GUI, debug server etc log output support. tiOPF can be found on SourceForge (http://www.tiopf.com)
Regards,
- Graeme -
How are we supposed to do that with only this little piece of code? E.g. what is GRD_ ?…
How are we supposed to do that with only this little piece of code? E.g. what is GRD_ ?
Apologize, I was forget,
GRD_ is TRxDBGrid. TNotify event is OnEnter and OnExit events. This events not modified by rx, comes from TCustomDBGrid->....TWinControl And not just onenter event
OnEnter
GRD_.BorderStyle := bsSingle;
onExit
GRD_.BorderStyle := bsNone;On windows, trigger it self, when click on grid and onenter event triggered onexit then onenter?? this been start endless loop. In linux everythink is normal
I do so on my Linux VM without any problem whatsoever.
Thank you Bart, I was wrote its work on linux. What is your linux info? x64? kde gnome etc
And I know can clone vdi from vbox, but I have not enough space on my disk, If I can find free space my first job will backup my sistem and upgrade my kubuntu 13.10 to 14.04 lts
I was looking for just maybe I didn't see can make remote debug :) just try my chance. Martin message in my bookmark I'll try it, if I finish my todo list :S
Than you for all answers
FreeMan wrote 16 lines
Changing control layout within a control event is tricky since this may trigger a control recreation. This may fire some events.
Marc
