VS Console window does not show all results - visual-studio

I am using VS express 2012 to run a code that display content of many files. I found that first files content do not show and when I debug step by step I found that the content show on the console window and disappear when other results show, which means they get pushed out of the window. of course I scroll up and I find the latest files only not all. Is there any option control this feature? and how can I see all results?

To avoid this you should convert your console application to a Windows Forms one and put all the output on a TextBox. Just execute the command on the Form load and redirect all the output to the TextBox.
It's not much work IMHO.

This is the nature of a console application, no different than if you were to echo data to the Windows command prompt. If there is too much data then of course it will scroll off the visible screen.

Related

Visual Studio Code - display project name first on Alt+Tab window

Following little issue:
My ustal workflow consist of several VS Code windows opened
When switching between them via Alt+Tab, Windows 10/11 displays their instances name in format file_name - project_name. Names might get capped as well, so usually I'm ending in format like file_n.... It's kinda annoying to guess, what from list like:
index...
index.js - pr...
index...
is the one, that I'm searching for.
The question: Is there a way to change display format of VS Code windows in Alt+Tab view, preferably to show project name first?
The setting window.title contains the file location first.
Change it to:
"window.title": "${rootName}${separator}${dirty}${activeEditorShort}${separator}${appName}"

Managing windows when local SAS session starts

When a SAS session starts, there are 5 windows. (Result Viewer, Explorer, Log, Editor, Output).
My desired state is when the session starts:
No result viewer
No output window
No default explorer window
The useable explorer window default open(to clarify this i attached a picture)
Good/Bad explorer window
Enchanced editor open
Log window open
So there will be 3 windows opened at session start, and i would like to resize them into 3 columns.
What i got so far:
I know the task can be done, because i was able to do this on my working computer. Unfortunately they reinstalled my windows without a word, and i lost my setup. And i did not have my autoexec/sasv9cfg file backuped. :(
I can close the output window with dm listing off command in my autoexec.
I can resize the 3 windows if i have them, with dm wdef command as well.
My biggest issue is i cant find again a DM/ODS or any kind of command, which closes the Result Viewer, and the original Explorer, and opens the normal/usable Explorer. In my faded memories i needed only 1 DM/ODS/sth command to achieve these 3 steps at once. Of course, if we can find a solution in more steps, thats also completely fine.
Big thx for any kind of help
You do not want the DMSEXP docked windows (which includes ODS Results tab) at session start up. The only way to do this programmatically is to specify the SAS system option -nodmsexp in the sas.exe command line or config.sys.
So, on my system, I set the target command on my SAS icon to be:
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe"
-CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg"
-NODMSEXP
Tweak the SAS DM session window states by placing this code in your autoexec.sas
dm 'dmsexp;tree on;next;listing off;tile vert' ;
You can also fiddle around with your session start up using the system options:
initstmt=
initcmd

Read current terminal

Is it possible to read what's currently displayed on the windows terminal pragmatically using any available API?
For example, I've got an app that tail's some log files. I'd like to be able to hit a key and open a text editor at the line that is currently being viewed. The problem is the terminal also has scroll bars.
Not easy. Perhaps you could capture the screen and use OCR to identify its contents, or make a shortcut to some sort of macro that selects all the screen and copies the text. But there is no API available to perform the task you ask.
Of course, you can tee the command you're running in the console to a file, and open such file with an editor whenever you like, however it will show the full output of the command and not the visible part. If you like more information on that topic, it is answered in SO - Displaying Windows command prompt output and redirecting it to a file
.

Tool for capturing screenshots in TFS2010 Web Access

I need a tool to capture and attach screenshots in TFS team web access. Instead of having some thrid party tool that captures and saves images on disk and then you have to attach that image to a bug like bugshooting. I want something integrated within TFS.
In VS11 it is possible to copy and paste your screen shots in the description field of the work item. You can check out the VS11 Beta version yourself.
There's nothing integrated in VS, but there are a couple of easy options:
use the standard Windows screenshot function. Alt-PrtScrn will capture the current window, and then you can paste into your work item's Attachments pane. It'll create a generic filename and attach as a PNG.
if you're using Win7, try the "Snipping tool" (just press Start and type "snip" to find it). That will capture a specified area and can then copy it to the clipboard or save to a file. If you copy & paste you still have the problem of generic filenames, though, so personally I still tend to save it myself.
As #Hofman said, you can do it with VS 11 beta, so you can use MS Paint or even SnagIt, for how to do it just see the following link:
http://mohamedradwan.wordpress.com/2012/02/29/new-enhancement-in-mtm-11-preview/
You may want to check the Capture Custom Control - you can use it to embed a "Capture" button in your work items. It automatically attaches the screenshot to your work item.
Check it out at http://witcustomcontrols.codeplex.com/wikipage?title=Screenshot%20controls&ProjectName=witcustomcontrols
there are a very powerful tool which comes with Windows Server 2008 (Actually I'm not sure if it comes with windows 8 or 7)
never-mine.., the tool called "Record Steps To Reproduce the Problems" , this tool built for Taking screenshots of doing any thing in your machine step by step... WOW
You just need to open the start panel and then write "record steps to reproduce a problem". starting record, and make you job that you want, then when you finish stop recording and save the zip file in your machine.
the zip file will expose a word document contains every single click that you make and every page you've open with some description.

Command line in Visual Studio - how to close popup window?

I have situation like below.
I'm running some command and then I get a popup with Y/N answer. Is there a possibility to force answer Yes and automatically close the window through command line?
If you want to click a button in an external window, you'll need to hook the window with the button exposed. You can accomplish this by grabbing the window handle via FindWindow, finding the child button, and sending a BM_CLICK with an API call via SendMessage.
you mean a command window within VS ? I don't think there's anything generic, you could run all sorts of things, depends on what your command is - and how much control over it you have - maybe some example of what you're trying to do could help. 'picking' the window will work but depends again on what you're doing, how custom it is etc.

Resources