WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
Re: WinFBE FreeBASIC Editor for Windows
Two remarks: Multiline comment doesn't mark lines as comment (no color change) and I miss the feature from FBEdit - additional parameter changing keywords case to First Letter (For, Next etc.)
Re: WinFBE FreeBASIC Editor for Windows
How to monitor a runtime error, compiling with the option -exx
(I am always using this option during development)
(I am always using this option during development)
- Rustic solution :
Launch your "program.exe" from a (prompt) command window, in order to display the runtime error message. - Using FBIde :
Referring to http://www.freebasic.net/forum/viewtopi ... 31#p121731, you can edit the run command menu and enter "cmd /c "<$file>" <$param> & pause", in order that IDE opens a command window, runs the program, and then waits for a keypress before closing. - Using FreeQ IDE:
You get automatically a pause (in the command window) after compiling + running with option "-exx", and also you can just select a check-box "Pause after execution" to pause after compile + run (without "-exx") - Using Geany :
Basically, the command "Execute" runs the executable file from a terminal window (shell script calling "cmd.exe" set per default in the menu "Edit/Preferences/Tools). - Using FBEdit :
Only the rustic solution : launching the executable file from a command window opened with menu "Tools/Command prompt". - Using WinFBE :
???
Re: WinFBE FreeBASIC Editor for Windows
@FXM
Regarding FBEdit:
You can modify the build option and it seems to work without dropping down to a command prompt.
This image is using the build option Window Console (debug).
Regarding FBEdit:
You can modify the build option and it seems to work without dropping down to a command prompt.
This image is using the build option Window Console (debug).
Re: WinFBE FreeBASIC Editor for Windows
See my similar response at http://www.freebasic.net/forum/viewtopi ... 45#p234345.
-
- Posts: 1002
- Joined: Jul 14, 2005 23:41
Re: WinFBE FreeBASIC Editor for Windows
Hi fxm,fxm wrote:See my similar response at http://www.freebasic.net/forum/viewtopi ... 45#p234345.
OK, I see what you are looking for. Be able to capture the output of a crashed program due to runtime error. I will try to implement a solution because it seems like a very good feature to have.
I assume you know how to add the -exx for project and non-project files:
Non-project:
View :: Environment Options :: Compiler Setup :: Additional compiler option switches
Projects:
Project :: Project Options :: Error Checking
-
- Posts: 1002
- Joined: Jul 14, 2005 23:41
Re: WinFBE FreeBASIC Editor for Windows
I am now able to capture the STDERR output that -exx throws on runtime errors (used a pipe and createprocess to redirect the output). I just now need to integrate that error message in a meaningful way in order to display the code file and position to the error line just like any other error. Should have that coded soon and then I'll post here with a link to the updated files and source.PaulSquires wrote:OK, I see what you are looking for. Be able to capture the output of a crashed program due to runtime error. I will try to implement a solution because it seems like a very good feature to have.fxm wrote:See my similar response at http://www.freebasic.net/forum/viewtopi ... 45#p234345.
-
- Posts: 1002
- Joined: Jul 14, 2005 23:41
Re: WinFBE FreeBASIC Editor for Windows
Hi fxm,PaulSquires wrote: I am now able to capture the STDERR output that -exx throws on runtime errors (used a pipe and createprocess to redirect the output). I just now need to integrate that error message in a meaningful way in order to display the code file and position to the error line just like any other error. Should have that coded soon and then I'll post here with a link to the updated files and source.
Try the new runtime error trapping and reporting version 1.3.7
https://github.com/PaulSquires/WinFBE/releases
Re: WinFBE FreeBASIC Editor for Windows
- Yes, but there is no detailed display for another crash kind like "segmentation violation" signal:
- In addition, after the filename, there is the name of the procedure where the crash occurs ("::S()" for the above case, "::()" if it is in the main code").
This may be interesting when there is no error line number reported as for the above code.
Code: Select all
Sub s()
Dim As Integer Ptr p
Print *(p+1)
End Sub
s()
- All runtime errors are at TblRuntimeErrorsAborting due to runtime error 12 ("segmentation violation" signal) in D:\Users\T
0003830\Documents\Mes Outils Personnels\FBIde0.4.6r4_fbc1.06.0\FBIDETEMP.bas::S(
)
- In addition, after the filename, there is the name of the procedure where the crash occurs ("::S()" for the above case, "::()" if it is in the main code").
This may be interesting when there is no error line number reported as for the above code.
-
- Posts: 1002
- Joined: Jul 14, 2005 23:41
Re: WinFBE FreeBASIC Editor for Windows
Thanks fxm, I will make the changes and upload again.
-
- Posts: 1002
- Joined: Jul 14, 2005 23:41
Re: WinFBE FreeBASIC Editor for Windows
Hi fxm,
You can download 1.3.8 and try it to see if the error handling is better for those runtime errors.
https://github.com/PaulSquires/WinFBE/releases
If you need any changes at then please let me know.
You can download 1.3.8 and try it to see if the error handling is better for those runtime errors.
https://github.com/PaulSquires/WinFBE/releases
If you need any changes at then please let me know.
Re: WinFBE FreeBASIC Editor for Windows
OK.
I tested this improvement for 4 different runtime errors:
- Aborting due to runtime error 6 (out of bounds array access)
- Aborting due to runtime error 7 (null pointer access)
- Aborting due to runtime error 2 (file not found)
- Aborting due to runtime error 12 ("segmentation violation" signal)
Small remark about the column "Description" in case of error 12 ("segmentation violation" signal):
Why the text in "Description" is not truncated as for the other errors (the filename information is already in the column "File" and the procedure name information is in the column "Line")?
I tested this improvement for 4 different runtime errors:
- Aborting due to runtime error 6 (out of bounds array access)
- Aborting due to runtime error 7 (null pointer access)
- Aborting due to runtime error 2 (file not found)
- Aborting due to runtime error 12 ("segmentation violation" signal)
Small remark about the column "Description" in case of error 12 ("segmentation violation" signal):
Why the text in "Description" is not truncated as for the other errors (the filename information is already in the column "File" and the procedure name information is in the column "Line")?
Description
Aborting due to runtime error 12 ("segmentation violation" signal)in D:\Users\T0003830\Documents\Mes Outils Personnels\WinFBE-.3.8\FBIDETEMP.bas::S()
Last edited by fxm on Jul 23, 2017 8:35, edited 2 times in total.
Re: WinFBE FreeBASIC Editor for Windows
Since these last 2 revisions, code running does not work when executing simple program as:
[/b](the more recent version that works is WinFBE Version 1.3.6)
Code: Select all
Print "OK"
Sleep
Last edited by fxm on Jul 23, 2017 12:54, edited 2 times in total.
Re: WinFBE FreeBASIC Editor for Windows
I'm not sure that the capture of the STDERR output is the right solution, because it is necessary that a compiled program (under the IDE with -exx) also works when it is launched directly from a command window, and It continues to be able to display a runtime error message on the command window.
For the 3 working IDEs that I know, they all open a command window, run the program, and then wait for a key press before closing it (an eventual runtime error message is always displayed on the command window itself).
For the 3 working IDEs that I know, they all open a command window, run the program, and then wait for a key press before closing it (an eventual runtime error message is always displayed on the command window itself).
Re: WinFBE FreeBASIC Editor for Windows
We can redirect to get stderr message, but the normal output and input will gone, so I think the solution is as fxm says...fxm wrote:I'm not sure that the capture of the STDERR output is the right solution, because it is necessary that a compiled program (under the IDE with -exx) also works when it is launched directly from a command window, and It continues to be able to display a runtime error message on the command window.
For the 3 working IDEs that I know, they all open a command window, run the program, and then wait for a key press before closing it (an eventual runtime error message is always displayed on the command window itself).
-
- Posts: 1002
- Joined: Jul 14, 2005 23:41
Re: WinFBE FreeBASIC Editor for Windows
That's strange because it works perfectly for me on both the 32 and 64 bit versions. Are you sure that you have the CONSOLE selected. Just click on the panel in the statusbar to quickly switch between console and gui. When I run the program, the console window appears and "OK' is printed to it.fxm wrote:Since these last 2 revisions, code running does not work when executing simple program as:[/b](the more recent version that works is WinFBE Version 1.3.6)Code: Select all
Print "OK" Sleep