FbEdit, new IDE for FreeBASIC written in FreeBASIC

User projects written in or related to FreeBASIC.
Post Reply
bobsobol
Posts: 65
Joined: Nov 04, 2006 9:19

Post by bobsobol »

My problem with that would be answered in one simple question:-

"How do I know my program works well without full Admin token, if I only developed, and tested it with one?"

As I say, I have not needed to elevate my user token in order to use debugging in Vista. However, I don't usually develop, even GUI applications using the traditional, Windows only, gui libraries.

Those libraries rely heavily on callback threads to handle Windows Message Queues, and threading is usually discouraged in Posix OS (as expected by GDB, and simulated by the MinGWin environment freeBASIC compiles in) in preference to multi-process operation. Windows communication between threads in the same process is well supported, but between processes is highly restricted unless you carry a full-token admin user account.

An interesting side-note, (since we are talking about development with freeBASIC on Windows OS) Pelles C (a Windows specific, enhanced version of LCC) definitely does require me to run the IDE with an elevated token.
Dinosaur
Posts: 1507
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Post by Dinosaur »

Hi all
Are you serious? Do you realy want to (develop or) debug your (or at least unknown) code with admin privilegs?
No, I don't debug unknown code, particularly cause I don't have the source. And my code is safe.
TJF, how do you debug in Windows7 ? If I can debug without Admin priveleges then I will do it.
It also interesting how many times W7 asks the question "Do you want to run this program as admin" (or something like that).
"How do I know my program works well without full Admin token, if I only developed, and tested it with one?"
That's easy, I dont run my apps under admin priveleges. It gets put onto a cfc and put into an industrial cpu board where I finally test it.

Regards
bobsobol
Posts: 65
Joined: Nov 04, 2006 9:19

Post by bobsobol »

Well, I have to admit, I can't run OllyDbg without being in Admin mode... I tend to drop down to 2K or XP Virtual Machine to debug as a "limited user" there.

The reason Windows often asks if you want to run a program with an elevated token, is because people are still writing code without regard to the "XP style guide", which pointed out that numerous functions would only be available to full administrator accounts, and that users should not be running as an administrator for their daily operation.

Because XP users do run as full administrator for their daily use, and do so because most XP applications don't work unless they are the local administrator, MS have had to get tough, and force the UAC confirmation upon administrator accounts.

They are still loosing the battle against stupid users, and stupid developers, because users are either ignoring or disabling the UAC warnings... because developers are not bothering to ensure that their program will work well if the UAC level is raised (such as a limited account which does not know the local admin password) to the point where you cannot authenticate.

But there is a problem which I guess we share. Namely, how do you debug a problem in code which is concerned with UAC elevation?

Namely, when your program needs to do something different if the user has the elevated token to what it would do if it was being run as a limited user.

I have faced this, and found it a difficult one to tackle, resorting to outputting massive amounts of information to DbgPrint() and running with various levels of user account, profile and elevation.

The job would be so much easier if debug tracing could be done at any level of user elevation.

It is possibly for that very reason that so many developers give up and simply say "this is too hard / costly / time consuming, let's just force the user to run the program with full admin rights." :(
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Post by TJF »

Dinosaur wrote:No, I don't debug unknown code, particularly cause I don't have the source. And my code is safe.
During development, my code isn't save. Sometimes, I'm too laisy to read a lot and I do trail and error. This must not be bad if you have good testing methods. But sometimes I want too much. I concentrate on one thing and another one goes wrong. In such a development phase my code isn't save at all.
Dinosaur wrote:TJF, how do you debug in Windows7 ? If I can debug without Admin priveleges then I will do it.
I don't test at vista or w7 at all. I develop at LINUX where I have no problems with unsave code. (At maximum I can destroy my home directory with unsave code and even this didn't hapen up to now -- knocking on wood). Finally, I do some testing on XP on the box of a friend (I've no win box at all). Or I do short intermediate tests under Wine.

IMO it's up to the professionals (C like developers) to generate cross-platform libraries and to care about the system specific windows issues. As a FB coder I use these libraries and don't care about all the problems on the different win systems. ATM using GTK+ and it's dependencies is the best way to go.

If I need a debugger I use GDB in my IDE (Geany with GDB plugin) under LINUX. But in most cases I don't need a debugger at all. I use a set of debugging macros or the GLIB debugging functions.
bobsobol
Posts: 65
Joined: Nov 04, 2006 9:19

Post by bobsobol »

That's all fine and good, but this thread is about FB Edit, which is only available for Windows. (AFAIK... not sure how it would attach Windows dialogue resources to the resource section of an executable on any other OS anyway, let alone the XML security manifest which describes the minimum user level context and UX-Theme compatibility, or the Windows Version sting resource)

The primary reason for using this IDE is that it makes the development of Windows specific assets required to be linked into Windows PE executables (and not available in ELF or Mach-O binaries) easier.

I think the ultimate answer (therefore) is that GDB is not good for debugging in Windows, where user rights is an issue. :( As I say, that's beyond the scope of freeBASIC or FbEdit, and would need taking up with the MinGW team. :\
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Post by TJF »

bobsobol wrote:... but this thread is about FB Edit, which is only available for Windows.
This is the Projects forum!

You may ask the admin to move this topic to windows. But until this happens, never mind getting answers from a non windows point of view.
Dinosaur
Posts: 1507
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Post by Dinosaur »

Hi all

From an FBEdit point of view this problem is solved, and if I have further questions on this subject I will start another thread in the appropriate forum.

Regards
Many thanks for all the help.
bobsobol
Posts: 65
Joined: Nov 04, 2006 9:19

Post by bobsobol »

Fair enough.

Actually I wouldn't want them to be "Never from a non-Windows point of view."

I just think that, as the thread is about FbEdit (in the Projects forum) advise on fixing UAC problems with FbEdit by using Linux limited account, which also won't run FbEdit at all, is not helpful.

I suppose it should work under Wine... but that still wouldn't help me debug UAC issues with it as Wine doesn't support those either.

Having said that, I still don't need to elevate my user token in order to run FbEdit, or debug a program. Clearly, others do. :s
bcohio2001
Posts: 556
Joined: Mar 10, 2007 15:44
Location: Ohio, USA
Contact:

Post by bcohio2001 »

Is there any plans for adding copy/paste capabilities in the resource editor?

A few times while working on a project, I remember that I created a dialog or menu in another project that would work in the new project with some minor modifications.

This would be much easier than opening both rc files in a text editor, copy and paste. And then having to worry about conflict of ID's.
fxm
Moderator
Posts: 12549
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Post by fxm »

For more than a week, the Web site http://radasm.cherrytree.at/fbedit/ for FBedit does not answer any more.
What happens?
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Post by MichaelW »

Both of the mirrors that KetilO posted here appear to be working.
fxm
Moderator
Posts: 12549
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Post by fxm »

MichaelW wrote:Both of the mirrors that KetilO posted here appear to be working.
Ok, but warning because at these two mirrors, there are only old versions of FBedit (1.0.6.7 and 1.0.7.0).

The last version (1.0.7.6c) can be found at:
https://fbedit.svn.sourceforge.net/svnr ... FbEdit.zip
fxm
Moderator
Posts: 12549
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Post by fxm »

fxm wrote:For more than a week, the Web site http://radasm.cherrytree.at/fbedit/ for FBedit does not answer any more.
What happens?
I see that (by chance?) the link is suddenly back (after many days of break)!
I guess there has to do with my post.
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Post by anonymous1337 »

Hello KetilO,

I really appreciate the work you've done so far. But I came up with some (kind) criticism and suggestions for the editor.

1) While libraries (modules) + a main file is very standard for FreeBASIC projects, it would be nice if command-line options for each individual file could be customized.

2) Why is "Project Description" a required field? If one is not provided, default to the name of the project.

3) Replace the ambiguous .bas, .bi, .txt, .rc in the "File Creation" section of "Create New Project" with MyProjectName.bas, MyProjectName.bi, etc. if possible to clarify what you're offering the user.

4) When compiling a project (not the "Go" button, which will run the program), don't you think it makes sense to compile modules as well? With modules compiling first, then the project files.

5) The "Path Options" form should tell users the exact files it's looking for. Users shouldn't have to go into FBEdit's help file to figure out "help path" expects "FB.chm" as the file name.

6) Feature request: A global, user-managed framework of libraries. It would be included/available to each new project. Users can "import" a library and add new libraries to it. For example, it could make all the libraries included with fbc available by default.

7) Is it possible to add new folders into a project? FBEdit didn't seem to have that option in the right-click menu for projects.

8) The documentation is full of typos. A run through the English docs with spell check wouldn't hurt.

I know that seems like a lot, but it's only because I've been making use of FBEdit so heavily for my past couple projects.

Sincerely,
- anonymous1337
Mihail_B
Posts: 273
Joined: Jan 29, 2008 11:20
Location: Romania
Contact:

Re: FbEdit

Post by Mihail_B »

I must thank you for the creation of FbEdit ...
I use it daily for most of my programming stuff ...
It helped me to start/work/finnish elaborated projects ....

it increased my development speed, helped me with
"orthographic"(variable names spelling) bugs, ...

it's definetly of an appreciable use !

I have nothing to reproach ... (it's definetly better then vb6's editor ...
can't say anything about visual studio 2008++ because it's made by a corporation ... which implies lots of good programmers, which are also being payed)

I would definetly like to aword you with money ... but even at 27years i'm back to school ... for another 3 years ... and only after that I'll get a job in IT ... 'cause now I have to learn ...)

Thanks again !
There are lots of programmers who are very grateful to you for your advanced editor !

This is no flattery or an ironic joke !
I hope one day I'll reward you for the help I've got from your program

Honestly, God bless you !

Thanks again !
Post Reply