vs2017screenshot
The output terminal is not opening at all, not even popping out for a second as I saw in different compilers. How can I see the output "HI" please?
Try to set Console (/SUBSYSTEM:CONSOLE) to the SubSystem property. Right click on the project in Solution Explorer then Properties->Linker->System:
Related
I have reinstalled Visual Studio Code and for some reason, when I do the Ctrl+Shift+` shortcut, instead of opening a terminal window inside VS Code, it's opening an external command window, which is very annoying.
Anyone knows what setting it is to get it back internally?
I tried File->Preferences->Settings->Terminal and then set the first option "Customizes what kind of terminal to launch." to integrated.
Is there any other setting I need to set?
Happened the same with me. It was because I was using Legacy Console. To disable that, open any of your terminal (cmd or powershell) and right click to go to properties.
Properties -> Options -> Use Legacy console (tick it off).
Turn off ConPTY integration in the
File->Preferences->Settings->conPTY->Uncheck it
This is worked for me as mentioned here: https://stackoverflow.com/a/56267064/2462531
Found this:
https://github.com/microsoft/vscode/issues/72033
Which is listed as a duplicate but someone was also kind enough to link to this:
How do I get around the verified bug in Windows 1903 and launch the VSCode integrated terminal?
Which has a workaround as an answer, yay!
Here's some things you can check:
Make sure you've set integrated on both the User and the Workspace settings, because the Workspace settings can override the User settings.
Make sure you are using the correct keyboard shortcut. VS Code actually has a shortcut for opening the system's native console, which will open an external window:
Make sure that your Ctrl+Shift+` is actually the shortcut for Create New Integrated Terminal:
I'm new to VS. I came from Eclipse. Could anyone let me know how I can display the outputs as they were in Eclipse?
Anytime I "Run" (Build&Run) the code, the command line show up about a second and close up.
As I don't want to add any code like cin >> xxx to keep the command line window from closing, could anyone let me know how I can get the output within the Development window? Thanks!
There is no option in Visual Studio that says 'Build and Run', its either from 'Build' or 'Run' category. You build, and then run. When you run, it may build the solution, if necessary.
You can run solution either with deubugging (F5) or without debugging (Ctrl+F5). When you run with debugging, you may not see output. Run without debugging Ctrl+F5, and output window will wait for user input.
You may use (for testing purposes), getch, getchar or other function.
Unexpected error detected. Check the Tests Output Pane for details.
Where is the 'Tests Output Pane'? I can't find it anywhere in Visual Studio. I found 'Test Explorer' but it doesn't show any details.
In the output window there is combobox "show output from". Choose Tests as shown here
The message really should be this
Unexpected error detected. Check the Output Window for details which can be found in the Show output from: section. Then select the Tests drop down to read the actual error.
Why the Confusion?
For the Tests window is, buried, in the output window. That window acts as the main window that shows the textual Build information; and hides the test result info in another dropdown.
So in the OutputWindow select Tests after a run.
Go to the view tab at the top of your screen, and select output.
If you're looking for the actual issue, for me it was:
vstest.discoveryengine.exe and
vstest.executionengine.exe
Open up Task Manager, go to Processes tab, right-click and End Process. Restart Visual Studio.
For me killing vstest.console.exe and vstest.discoveryengine.exe processes did the trick. No need to restart visual studio.
from the output section, a Combobox will appear and you will find there build, debug similarly tests too
enter image description here
In case this helps anyone. All my test cases vanished from the Test Explorer (VS 2019 Pro v16.5.4) and I noticed the inconspicuous message in the status bar - unexpected error detected. Check the Tests Output Pane for details.
Restarting Visual Studio did not help. Restarting as administrator did not help too.
I followed #Ben-Power into Task Manager and found at least 5 occurrences of vstest.console.exe processes running.
Killed all and opened Visual Studio again. Test Explorer loaded all tests as expected.
In case this helps anyone... I had same problem with the TINY HIDDEN error message on the bar on the bottom of Visual Studio:
Unexpected error detected. Check the Tests Output Pane for details.
After the info in previous answers helped me find the Tests Output Pane...
The error message I found indicated that VS was trying to run "Release" version of tests, even though VS was set to select "Debug". VS could not find the "Release" test assembly, because it had not been built!
I had been switching between "Release" and "Debug" previously. VS must have bug that does not handle switching properly all of the time.
SOLULTION: Restart Visual Studio.
After restarting, Test Explorer picked up the "Debug" setting -- and used "Debug" version of the test assembly.
So for me , I resolved it by just deleting the root folder on this path.
C:\Windows\Microsoft.NET\Frameworks64\v4.0.30319\Temporary ASP.NET Files\root
Just delete this root folder & you should be good to go :)
Change Terminal from show output from:
I'm just starting with Visual Studio 2010, and I'm not even sure if this is the right question to ask. Let me explain what I'm trying to do:
Right now, when developing console applications, I compile/debug, switch to my command prompt, navigate to where the *.exe got dumped and run it--only to find that my output is mising a \t or \n somewhere--then I need to go back, fix, re-compile, etc., etc.
I'd like to be able to do a compile-on-the-fly-and-run-in-a-window type of thing without having to leave Visual Studio. Maybe a popup launched from VS? Maybe a pane in the interface for the command prompt? Does anything like this exist?
you can just hit F5 and it will run... might need to include
Console.Readline()
so the window does not close too quickly.
I have been assigned to a project at work and I need to do some old-style debug because the Debug itself doesn't work with the libraries which are being used.
So, since it's a C++ with Qt application, I first tried with qDebug(). Then with cout, and finally with printf (which I hate in comparision to the former ones). NOTHING.
Nothing is written into the output window of Visual Studio 2008, and I'm quite sure it is executing these lines of code (I even tried to put a qDebug at the very beginning of the main.cpp). It is a GUI app by the way, and I've tried Debug output as well as Build output, but nothing is displayed.
I have looked for similar questions, but none of them provided a solution yet. Any help?
Chances are, your Visual Studio environment has been configured to redirect all output from the Output Window to the Immediate Window. I've been bitten by this a couple of times, as this is inexplicably a default setting for certain environment configurations.
To reset the setting, follow these steps:
From the "Tools" menu, select "Options".
Expand the "Debugging" item in the tree to the left, and select "General".
In the list to the right, scroll down to "Redirect all Output Window text to the Immediate Window", and ensure that it is unchecked.
Click OK to return sanity to the world.
It looks like you can't use qDebug directly if it is not a console based application. Sounds weird to me, but sadly it is like that.