[Gambas-user] Debugging Gambas
KKing
kicking177 at gmail.com
Sun Jan 20 14:38:29 CET 2019
<<
I don't recall exactly what your project is. But, with "Use terminal
emulator" and "Redirect standard error output" enabled, Print displays
in the terminal and Debug displays in the IDE console. With redirection
disabled, both display in the terminal.
>>
With the issue I have of seeming to freeze, it doesn't matter which way
I have that setting I don't get any messages appearing in either the
terminal (which is being used for the ncurses) or in the IDE console.
I've tried the same solution on a much more powerful unit with
significantly more RAM and Gambas 3.9.1 and it behaves the same.
When I say freeze, I mean that F8 does not move to next line. As
mentioned if I choose Pause it crashes. What I've now noticed is that
Stop (Alt+Pause) works as normal.
I added a TraceLog sub to write to a log file, the code now calls that
repeatedly no problem until I get the "freezing" issue which now freezes
in that routine where it tries to open the log file (I'm opening and
closing it each time it goes into the sub). I've managed to deduce the
freeze comes in code that has been called repeatedly a number of time
after a particular separate routine is called once and returns and
carries on to the previous called upto a point, though that point seems
to vary (possibly due to my adding of further tracelog calls). Now this
separate routine also ha file calls but essentially is working with
completely separate files and variables than the routine the freeze
occurs in.
Is there any sort of File Handle limitations and what is the correct way
to free/release them? As example this is how I am currently working with
some of the files.
Public Sub TraceLog(strMessage As String)
Dim hFile_TraceLog As File
Dim strDateAndTime As String
hFile_TraceLog = Open "/home/test1/trace.log" For Append
strDateAndTime = Now
Print #hFile_TraceLog, strDateAndTime & " " & strMessage
Close #hFile_TraceLog
End
K.
More information about the User
mailing list