I am A PHP Developer, and first time working in Visual Studio C++ and wondering if there is some way through which i can display variables or contents to debug my application.
Is there any functionality like Console in Chrome as console.log(myvariable)?
You could use the TRACE macro.
TRACE( "This is a TRACE statement\n" );
Related
When debugging, is it possible to watch return-values in VSC? and how?
I can't find an option to watch auto-variables like Visual Studio has
See https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_44.md#reference-returnvalue-in-watches-and-debug-console JAVASCRIPT
With v1.44:
Reference $returnValue in Watches and Debug Console
When it's availble in the callstack, you can now reference the
function's $returnValue in the debug console and watch expressions.
So it can be used in the Watch view and the debug console.
Visual Studio Code recently supported this - the returned value can be found under "Local":
I am new to Visual Studio, so I am used to IntelliJ and Eclipse style of functioning. I usually do not use a debugger when I develop, so I do not want to use it in Visual Studio too.
Is it possible to disable all special debugging functionalities which Visual Studio provides when you start your application? I want to have only normal output for the errors. When I disable all debugging, then I do not have usual output too, so this is not an option.
I tried many settings, but nothing seems to work and give me the results I want - no extra popup windows, no shiny layout changes when you have an error, just ordinary output.
Thanks!
Everyone's definition of "normal output" is different. Personally, I like the way Visual Studio handles debugging.
The console window in Visual Studio is a debugger feature and hence that is why it doesn't work when it's not attached to the process. If you want a stack trace without attaching, you could use your language/framework's built-in facilities such as an Exception or StackTrace in the case of .NET. You could also have Windows write a crash dump, but then you are debugging the corpse inside of Visual Studio.
We have a .NET application using a lot of legacy components written in VB6. We were able to debug the VB6 code using native code debugger and generated pdb files in Visual Studio 2010. After upgrading to the VS 2012 (including Update 2) we cannot do this.
The module window shows following message:
Binary was not built with debug information.
You can also find following message in the output window:
Module was built without symbols.
When I try to load symbols manually, I get following message:
A matching symbol file was not found in this folder.
Debugging the very same dll or exe from VS 2010 works fine.
Is there any option to enable it?
I found a solution that works on my machine (per Microsoft's comments on ScottG's paid support request - thanks, Scott). Apparently Visual Studio's default debugger after 2010 doesn't handle VB6 DLLs, but there's a checkbox to use the old debug engine, which does:
I didn't need to enable Native Edit and Continue.
I have finally found how to enable debugging VB6 components using Visual Studio 2012. In short, you have to enable the old pdb format first by setting Options | Debugging | Edit and Continue | Enable native Edit and Continue and then you can attach to the dllhost.exe as usually.
In VS 2015 Tools->Options->Debugging->General, select 'Use Native Compatibility Mode'. It sucks that I still need to debug VB6, but I am thankful that I am still able to.
it seems that VS 2012 use msdia110.dll to decode symbol files, there's a DIA SDK sample in VS folder, you can test whether it can parse those VB pdb files. if it can't, i guess the new version DIA does not support old version pdb any more.
I am interested in programming c# in visual studio and I have a problem here. I have a mac book pro and installed parallel 7 and then windows 7. now I have visual studio 2008 installed on the machine but when i try to execute the command Console.Writeline, console would not stay open. it would just execute the command and in less than a second closes it down. is there any solution that I can use to fix it?
A console application exist after it exists the Main() method, that's most likely why the console window is getting closed immediately.
Try running the application using Ctrl + F5, or add Console.ReadLine() at the end of your Main() method.
You can run your application in debug mode with a breakpoint on the last line to get it to pause so you can read the console output.
This is a pretty common issue with Visual Studio development in all languages and there are several other ways around it. See the answers to the following questions on Stack Overflow for more options:
Visual Studio Console App - Prevent window from closing
How to make Visual Studio Pause after executing a console app in debug mode?
Seeing the console's output in Visual Studio 2010?
i am using IE 8 for testing the javascript i write for my web-application. i use something who are not unknown for IE 8 so they give me error each time
"Microsoft JScript runtime error: Object doesn't support this property or method".
are their any way to stop this error showing in visual studio when i debug the javascript.
when i refresh the page they give me error in visual studio. well i not want to see anything like showing error in visual studio.
so how i can disable the showing error for javascript in visual studio even i need to work with javascript breakpoint and trackpoint.
Unless I missed something, there's only three things I can think of:
Fix the bug
Debug in IE with the javascript debugger, instead of Visual Studio
Fix the bug
I recommend 1 or 3 ;)