简体   繁体   English

不再使用VSCode PowerShell 0.11.0调试控制台-如何现在“正确”使用VSCode?

[英]VSCode PowerShell 0.11.0 Debug Console is no longer used - How do I “correctly” use VSCode now?

I am still a relatively new PowerShell coder, and I have been successfully using the PowerShell extension v0.8.0 for Visual Studio Code. 我仍然是一个相对较新的PowerShell编码器,并且已经成功地将PowerShell扩展v0.8.0用于Visual Studio Code。 I could write a script, press F5 , and happily see my output. 我可以编写一个脚本,按F5 ,然后愉快地看到我的输出。

Today I noticed there was an upgrade to v0.11.0, so I clicked the install believing that newer = better. 今天,我注意到有一个v0.11.0的升级版,因此我认为是“更新=更好”,因此单击安装。

Unfortunately, now whenever I press F5 to execute my script, I get this error: 不幸的是,现在每当我按F5键执行脚本时,都会出现此错误:

"The Debug Console is no longer used for PowerShell debugging. Please use the 'PowerShell Integrated Console' to execute commands in the debugger. Run the 'PowerShell: Show Integrated Console' command to open it." “调试控制台不再用于PowerShell调试。请使用'PowerShell Integrated Console'在调试器中执行命令。运行'PowerShell:Show Integrated Console'命令将其打开。”

I can't say I've been smart enough to learn more than basics, and never really knew how to use the debugger, but I was getting by. 我不能说我很聪明,不仅仅学习基础知识,而且从不真正地知道如何使用调试器,但是我已经过了。 With this error, however, does this mean that every time I want to execute my script, I have to press CTRL + ` and then type out things like I was at a console window? 但是,出现此错误,是否意味着每次我要执行脚本时,都必须按CTRL + ` ,然后像在控制台窗口中那样键入内容? For now, I've found a workaround by clicking in the editor window and pressing CTRL + a , F8 . 现在,我已经找到一种解决方法,方法是在编辑器窗口中单击并按CTRL + aF8 I was hoping to start reading an article on debugging , but it seems like the extension update has rendered the material obsolete. 我希望开始阅读有关调试的文章 ,但似乎扩展更新已使材料过时了。

This seems like a huge step back in terms of usability, but I'm not sure if it's really a bug for the extension developer, or I'm just not skillfull enough to use the extension? 就可用性而言,这似乎是一大步,但我不确定这是否是扩展开发人员的错误,还是我不够熟练才能使用扩展?

All that happens now is the output is to the powershell integrated terminal. 现在发生的就是输出到Powershell集成终端。 So make sure that the Terminal tab is active. 因此,请确保“终端”选项卡处于活动状态。 Then hitting F5 works as normal (before). 然后按F5正常(之前)。

My launch.json looks like: 我的launch.json看起来像:

{
    "type": "PowerShell",
    "request": "launch",
    "name": "PowerShell Launch (current file)",
    "script": "${file}",
    "args": [],
    "cwd": "${file}"
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM