在Powershell中打开控制台应用程序 [英] Opening console applications in powershell

查看:293
本文介绍了在Powershell中打开控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发Win32控制台应用程序,想知道是否有任何方法可以在调试时使Visual Studio在Powershell中而不是cmd.exe中打开它.

I'm currently developing a win32 console application, and wondering if there is any way to make visual studio open it in powershell instead of cmd.exe when I'm debugging it.

我真正想要的是一个更好的外壳,无需单击即可在其中复制/粘贴等.

All I really want is a better shell, where I can copy/paste etc. without clicking.

谢谢

推荐答案

我认为您正在将NT控制台子系统(提供常见服务的应用程序框架)与cmd.exe(使用这些服务的应用程序)混合在一起. studio运行控制台应用程序,但实际上未运行CMD. CMD本身就是一个控制台应用程序,与您要调试的应用程序没有什么不同,因此在Powershell中"运行应用程序同样是一个错误的概念.

I think you're mixing up the NT console subsystem (an app framework offerring common services) with cmd.exe (an application consuming those services.) When visuals studio runs a console application, it's not actually running CMD. CMD is a console application itself, no different than the app you are trying to debug, therefore running your application "in powershell" is equally as mistaken a concept.

如果您想尝试在PowerShell ISE中运行它,那是不可能的. ISE是Windows应用程序(NT GUI子系统),它是与控制台完全不同的子系统.

If you mean trying to run it in PowerShell ISE, this is impossible. ISE is a Windows Application (NT GUI subsystem), which is an entirely different subsystem than that of the console.

-Oisin

这篇关于在Powershell中打开控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆