I am using Microsoft Visual C++ 2010 Express: In a C++ WinAPI application, how do I print to the debug window? What function do I use?
You're looking for the OutputDebugString function.
When running under the debugger (e.g., in Visual Studio), the arguments to this function are automatically redirected to the Output window.
Related
How to debug in standard library function in visual studio ?
Visual studio step by step debug using F10,F11 keys by setting breakpoints skips stepping into standard library functions.
I have .NET 3.5 web application which uses some COM dll created in VB6.
I have source code for both. Also I have pdb file for the COM dll.
I would like to load the VB6 dll code inside Visual Studio 2010 for debugging.
I am able to step into dll code from VS If I loaded the COM app in VB6 IDE.
Since I am new to VB, debugging using VB6 IDE is bit tedious for me.
So I wanted to debug the COM app code inside Visual Studio 2010.
I followed the instructions in Robgruen's Blog
The problem is VS2010 automatically creating Interop dll for the corresponding COM dll,
and It uses the Interop dll only. While debugging when I try to manually load the Symbol file for the COM dll(let's say MyComApp.dll) It fails and VS is instructing me to load Interop.MyComApp.pdb file. But I have MyComApp.pdb only.
How do I make this work?
You can not debug VB6 code in Visual Studio 2010 at any level higher than the compiled assembly code.
You can however convert your VB6 dll project to VB 2010 then use it in Visual Studio 2010.
Just drag and drop your VB6 project to Visual Studio 2010 (drag project to icon of VS 2010 then drop) and upgrade wizard will automatically convert it.
Or just use Artinsoft programs.
Good Luck! :)
I'd like to run my console application in a frame inside the Visual Studio environment and not in a separate window with an external prompt like the default behaviour provides. Is that possible?
I'm using Visual Studio 2010 ultimate on a Windows 7 32bit machine.
Try this: In the Visual Studio Options Dialog -> Debugging -> Check the "Redirect All Output Window Text to the Immediate Window".
Maybe this is behavior you'd like.
What I'd really like to do is debug an executable using the Visual Studio debugger. It comes with an Attach to Process feature. Unfortunately, the target executable only lasts for a short period- much too short for me to launch the executable and then navigate through Visual Studio and attach to it. How can I command Visual Studio to launch the executable and immediately attach the debugger?
AttachToLazy VS add-in can wait for a process to start and then attach to it.
This add-in was written for VS2008 and it looks like some people were able to get it to work with 2010 by adjusting some of the properties (info under the Discussions tab).
Which version of the Express edition of Visual Studio can I use to work with Windows Forms programs written in JScript .NET? I did a quick search and I can see versions for Visual Basic, Visual C# and Visual C++ ... but not JScript.
Up until now I've just been editing in Notepad and compiling using jsc.exe, but debugging is starting to become a real pain. I'd like to be able to step through my code and locate the exact location of a bug.
Thanks.
You can write JScript code in any version of Visual Studio you want. For the Express editions, Visual Web Developer Express is a good choice.
The catch is that you cannot compile JScript code in the Visual Studio IDE. You have to perform this step either from the command line or via the ASP.NET page.
See MSDN for more details: Writing, Compiling, and Debugging JScript Code