Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Newbie question: line numbering in PB

Newbie question: line numbering in PB
Thread Tools
Phlog
Guest
Status:
Reply With Quote
Jan 28, 2001, 04:00 PM
 
Hi;

Is it possible to show line numbers in the editor window margin in Project Builder?

I'm using PB to write code that is compiled using c++ from a command line, and debugged with gdb, also from a command line. It would be very handy to have the line numbers displayed in the source code editor window, so I could figure out where to put break points and quickly identify lines with errors.

I can't find anything in the documentation about this, and I can't find any switch in the user interface that would accomplish what I want.

     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Jan 29, 2001, 08:16 AM
 
I don't know how to display line numbers but if Project Builder shows any warning or errors just doubleclick on the error in order to be taken to the line where it occurs. You don't have to compile command line apps from the command line. There is some option in project builder's new menu which is like C++ tool or something like that so it'll let you write a command line app in project builder. You don't even have to launch it from the command line; project builder will do stdin and stdout, in the running window, it's just that it is kind of strange to do it that way but it works.
     
Phlog
Guest
Status:
Reply With Quote
Jan 29, 2001, 10:04 PM
 
Well, actually I was trying to avoid learning to use the IDE just now. It seems enough to learn C++, emacs, gdb, and UNIX all at once.

I gave it a try. I find that the redirection of STDOUT and STDIN is a little quirky. For instance, I have a few lines with "cin >> variable" in my program. When I try to type input into the console window of the IDE during a debugging session, hitting return does not cause the program to proceed. Is there something special I have to do?

Thanks.
     
Fresh-Faced Recruit
Join Date: Jan 2001
Location: San Jose, CA USA
Status: Offline
Reply With Quote
Jan 30, 2001, 06:10 PM
 
I don't have an answer to your specific input redirection problem, but in general I can point out that if you learn Project Builder you don't actually need to learn emacs, cc and ld command lines, or (much of) gdb. I've been developing on OS X for quite a while and have managed to avoid learning too much command line gunk. PB is your friend.

However in this case if you're having trouble with debugging in PB, the next recourse is to run your app in Terminal using gdb. You can still do all the compiling in PB, of course.
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Feb 1, 2001, 05:59 PM
 
I guess that the debugger doesn't do input. Anyway, if you want to go to a specific line in Project Builder and you know the line number you can choose go to line from the find menu. I didn't think of that before.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:13 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2