PDA

View Full Version : can't find/see "standard i/o, command window, command terminal"




JamesMcCain
Jan 10, 2012, 06:04 PM
maybe someone can point me in the right direction. I'm using Xcode 4.2.1, and playing around w/ command-line tool template. When running my code I am able to see output in the debugger console, however I am not able to find the "shell/command" input console to edit and modify my variables. (I'm assuming this highly fashionable IDE does do that correct?)

This would be similarly to MATLAB command window.

Could someone please point me in the right direction.



lloyddean
Jan 10, 2012, 07:03 PM
Input happens the same place as output.

balamw
Jan 10, 2012, 07:12 PM
This would be similarly to MATLAB command window.

Difference being that MATLAB is an interpreter. If you want the same kind of interactivity as you get there e.g. with the command window and workspace you need to learn about the debugger.

B

JamesMcCain
Jan 10, 2012, 07:22 PM
Difference being that MATLAB is an interpreter. If you want the same kind of interactivity as you get there e.g. with the command window and workspace you need to learn about the debugger.


yikes... any pointers or advice on learning/understanding debugger to differentiate between interpreter?

I also take it that the "visual" workspace of variables is not the same as well?


edit: in regard to debugger abilities vs interpreter

balamw
Jan 10, 2012, 07:33 PM
Maybe you could step back a bit and give us a bit more context for what it is you are trying to do.

You might be better off with a different tool/language.

(This is actually one reason I like to prototype data heavy stuff in MATLAB).

B

JamesMcCain
Jan 10, 2012, 07:51 PM
I'm going to start mac and hopefully iOS developing that will be using some MATLAB functions embedded in and was hoping to adopt a similar debugging/development-implementing method.

balamw
Jan 10, 2012, 08:21 PM
I haven't done that kind of mixed language work on Mac OS X, but I have embedded compiled MATLAB in other code under Windows.

Some things to read:

http://en.wikipedia.org/wiki/Interpreter_(computing)

http://developer.apple.com/library/mac/#documentation/IDEs/Conceptual/Xcode4TransitionGuide/Debugging/Debugging.html

You don't have quite as much flexibility in a compiled environment as you can't run random bits of code when you hit a breakpoint, but this is also true if you intend to distribute your MATLAB code. This tends to mean that you need to define your interfaces a bit more solidly before you start coding.

B

firewood
Jan 10, 2012, 08:39 PM
The Debugger control area, which appears in the lower right of the center pane of the Xcode window when running an app, should allow you to type input to stdin of a command-line app, as well as see stdout and stderr output. If the Debug area doesn't appear automatically, there's a tiny arrow in the lower left of the center pane to make the Debug area appear when the debugger is running.

I use it all the time.