Fivewin debugger (end of line problem)

Fivewin debugger (end of line problem)

Postby pieter » Tue Sep 22, 2015 7:17 am

Dear all,

I have a problem with a good display of source code in the fivewin debugger. Instead of seeing a new line I can see only a space in fivewin debugger.

Example:
Function HelloWorld()
MsgInfo(Hello World!)
Return Nil

would be in my case:
Function HelloWorld() MsgInfo("Hello World!") Return Nil
I see this in the fivewin debugger, but also in notepad:

I searched on the internet and I think it has something to do with: \r\n (windows new line character) and \n (unix new line character).
Notepad++ and gvim are displaying the code correct, but notepad not. If I copy code from gvim to notepad and save it and then use fivewin debugger it displays the code well.

I have a lot of files which could have the same problem. Anybody ideas how I can solve this problem?, maybe there is a tool.

Pieter
User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

Re: Fivewin debugger (end of line problem)

Postby Antonio Linares » Tue Sep 22, 2015 7:58 am

Pieter,

The FWH debugger is using MemoLine() to extract the source code lines.

I wonder if we can use a flag with MemoLine() to read lines separated with \n only:

In line 845:

aData[ nI ][ 3 ] := Rtrim( MemoLine( ::cSource, 254, nI ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Fivewin debugger (end of line problem)

Postby pieter » Tue Sep 22, 2015 8:48 am

Antonio,

Oké, That is indeed an idea. I also was wondering if there exist a tool, which converts all files of specific type in a folder (in this case .prg) and to replace \n in \r\n. I think that would also solve the problem, but the flag idea good be a better solution.

The reason why I am exploring the debugger, is that I think it would save me time in te future when migrating from dbf to sql. Because Now I am often printing a lot of MsgInfo() statements if there is a problem.

There is also another problem. splitter.prg, xbrowse.prg and folder.prg are not inherited, but overloaded(Which I think mean that the code is copied and our own code is added) in my application. I get problems with the fwh debugger if I use this overloaded classes and if remove the overloaded classes, then my program does not work correctly.

I would like to know whether other programmers use overloading often. I think that it is in general better to use inheritation, but the fact is that we have a lot overloaded classes in our program already.

So I think there are still some obstacles before I can use the fwh debugger effectively. I was also thinking, that I could start with a less advanced tool, which looks like MsgInfo statements. For example a logging system.

Pieter
User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am

Re: Fivewin debugger (end of line problem)

Postby Antonio Linares » Tue Sep 22, 2015 3:51 pm

Pieter,

OutputDebugString( cText ) is a very good option too. Text msgs are displayed in dbwin32 app.

dbwin32 is available from here:
https://bitbucket.org/fivetech/fivewin-contributions/downloads/dbwin32.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Fivewin debugger (end of line problem)

Postby pieter » Wed Sep 23, 2015 7:20 am

Antonio,

Thank you very much. It's a tool exactly what I need at this moment:D.

Pieter
User avatar
pieter
 
Posts: 117
Joined: Thu Jan 08, 2015 9:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 59 guests