Poll

How to end the stdin(std::cin)?

How to end the stdin(std::cin)?
0 (0%)
How to end the stdin(std::cin)?
0 (0%)

Total Members Voted: 0

Author Topic: How to end the stdin(std::cin) in emacs emulation mode?  (Read 6585 times)

izico

  • Junior Community Member
  • Posts: 2
  • Hero Points: 1
  • izico.appspot.com
How to end the stdin(std::cin) in emacs emulation mode?
« on: November 28, 2006, 02:05:35 PM »
Hi,all,

How can I end my stdin or std::cin input stream when I'm executing or debugging in VS?
I'm using emacs emulation mode to use emacs key bindings.
The ctrl-c,ctrl-d don't work as it seems that they are bond to default emacs meaning even in build/output window.

TIA
« Last Edit: November 28, 2006, 02:49:53 PM by izico »

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: How to end the stdin(std::cin) in emacs emulation mode?
« Reply #1 on: November 29, 2006, 11:28:53 PM »
I would suggest that when you are executing you change it (Project > Project Properties > Tools) to use an external shell instead of running in the SlickEdit build window, then you would get more natural behavior out of your app.

As for debugging, this is a more difficult problem.  The intrinsic problem is that your app is *really* running as a child process of the GDB executable, which is started and controlled by SlickEdit, so it is not a child of the shell running in the build window at all, that is why we have to start the "vsdebugio" process in there to shuttle input and output to/from the program being debugged.  This works running under the build window, to an extent, until you get to tty level control, then forget-about-it.

What we recommend in this situation is to start your app outside of SlickEdit, and then attach the debugger using Debug > Attach > Attach to PID using GDB...  This way, you can get full tty control over your application's input and output, and still debug using SlickEdit's integrated debugger.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: How to end the stdin(std::cin) in emacs emulation mode?
« Reply #2 on: November 29, 2006, 11:29:33 PM »
Oh, and one other thing.  You get a hero point from me for that signature.

izico

  • Junior Community Member
  • Posts: 2
  • Hero Points: 1
  • izico.appspot.com
Re: How to end the stdin(std::cin) in emacs emulation mode?
« Reply #3 on: November 30, 2006, 06:44:13 AM »
Hi,Dennis,

Thanks for your answer.

In fact this is not a very frequent and important problem,your current solution is enough  in the rare case that it matters,though i feel instinctively that it can be done just like gdb does in a console,but it may hurt your program's structure,so you don't implement this feature?

As a new SlickEdit user,I'm glad to spread to all my colleagues and friends:
SlickEdit is the best ASM/C/C++ editor I've ever used by now.

But if your company can add some features of Eclipse to it,we'll be more happy and envy Java/Eclipse no more:
1. UML diagram/codegen(I use Umbrello now)
2. more project/build management integration(i'm using cmake now)
3. more version control integration(I'm using subversion now)
4. more TDD integration(unit test and refactor)
5. etc.

I mean not just inclusion of a feature,but the robust and easy use of the feature.As now,the refactor feature is of no much use in a large embedded system project,such as one workspace with Linux kernel and a lot of third party Linux software together,it's natural to put all the stuffs of one project in one workspace,and the refactor will not work in so large workspace.

So, my love to C++/SlickEdit is conservative,and my hate to Java/Eclipse is limited too.