I hope someone got an idea for a little problem of mine...
I got the following Postbuild-event script in my visual-studio 2010 project:
copy "D:\Sources\Project/output\program.exe" "D:\Project\Testserver\"
cd "D:\Project\Testserver\"
start "" /I "D:\Project\Testserver\program.exe"
The program is starting properly in a new window but the build-process is not ending before I stop the batch.
The same command in a normal windows shell does create a new independent instance but visual studio seems to wait for the process to end, why? I just want it to copy and start the program and then complete the build-process, is there a way to accomplish this? Thanks!
Oh and the follwing error is thrown in the visual studio output window:
Error: The input redirection is not supported. Process will be killed immediately.
(I translated this from german text but still google does not find anything to this error-message)
Would be cool if someone has experience with this. Thanks!
Related
I'm using this LinkedIn learning course https://www.linkedin.com/learning/visual-studio-code-building-an-extension/scaffolding-an-extension?u=67553434 to create an Extension. I'm creating a theme currently, so its a .json file
The course tells me to launch the debugger, but I keep getting an error saying "Cannot launch program (file path); setting the 'outFiles' attribute might help. Any idea what this means? is my file path correct?
I'm sure i'm doing something silly, so would appreciate any quick help to get me going. Thanks!
I am trying to attach to w3wp.exe to debug classic asp.
i am attaching to type "Script", but get the following error:
Failed to attach to these type(s) of code: Script: A debugger is already attached.
i saw online that maybe another program is running on the background and is using "Script".
how can i find out what program uses it? and possibly kill it? or is there another way to go around it.
maybe i can debug classic asp without attaching to Script? this is the only way i've been able to do it in the past.
Thanks!
you have to configure asp in your iis and set server-side debugging to true.
then you can use the "stop" keyword in your asp script in the line you want to set a "break Point". when the line is executed a window will popup and you can start visual Studio to debug your asp script.
My post-build event works, but in some situations I am quite sure it is showing an error in the console window. However, because the window closes immediately, I'm not able to read any of it.
This is the build event:
if $(ConfigurationName) == Release start xcopy /y "$(TargetDir)*.dll" "$(ProjectDir)../../bin"
Basically it copies the built dlls over to another directory.
Is there a way to force the console window invoked by start to remain open until I close it?
I think that the information that you want is written in the "Output" (Views > Output or Ctrl-W + O). That information is still written/available after everything has ran.
For example, the output for
echo Information on the post build event
some_non_existant_command
is
Information on the post build event
'some_non_existant_command' is not recognized as an internal or external command, operable program or batch file.
which will give you a better hint at what's going wrong than the Error List (Ctrl-W + E) which will only display something cryptical, like "... exited with code 9009".
So, my advice, check the Output!
Hope it helps.
I am testing an F# project using NUnit. On the debug tab of project configuration I have set the debugger to use an external program which is nunit-console here and the working directory to the debug folder of my project. I prefer using nunit-console with the debugger since the GUI version doesn't hit the test file's breakpoints.
When I debug the test the console window appears and disappears and there is no chance to read the output. I have tried Console.Readline(), but it doesn't work because when I directly run the test from a terminal using nunit-console, it fails due to this command.
Is there a way to redirect the nunit-console output to the Visuals Studio's output window?
UPDATE: I could use Thread.Sleep() to delay the nunit-console.exe when I run the test from the console. But from Visual Studio it doesn't happen so I am pretty sure that nunit-console.exe fails to read the test file when the command is issued by Visual Studio. Still, it would be very nice to be able to read the console output, thus the redirection is still desirable.
Either use Tools->Options...->Debugging->General:"Redirect all Output Window text to Immediate Window" and then make sure that the "Immediate Window" is visible with Debug->Windows->Immediate.
Or use NUnit's "/wait" command line option.
Unless I am missing something, you should be able to hit all your breakpoints with the GUI as well, set the startup project to nunit.exe and pass the name of your test DLL as a command line parameter. You will hit the breakpoints in Visual Studio, and your print statments will be in the GUI's output tab.
I've installed Visual Studio 15.9.0, Preview 3 and created a project using the new platform support for C++/winrt. The project runs fine until I set a breakpoint. When the break is hit VS tells me "You need to find debuggerutils.h to view the source for the current call stack frame" It tells me this file was originally at onecore\com\combase\inc\debuggerutils.h, though it doesn't tell me the path to onecore. Search can't find such a file. Does anyone know how to find that file or install it? I had just assumed that VS would automatically include debugging capability.
[Update] Appears it is not the setting of a breakpoint but a bug causing a break before that. But I'm still mystified by the error message.
Someone asked this question on github's WinObjC issues:
https://github.com/microsoft/WinObjC/issues/2931
From the discussion:
edvv commented on Nov 22, 2019
Ah, now I remember what this means: "This is a false message. What really happened is that your app silently terminated (maybe by a console abort(), i.e.: crashed ) and when the app failed to launch (aborted) the front end gave that message. You need to look at the Windows Console window in VS while in debug mode."