visual-studio-debugging

Disable noise messages in debug output windows - visual studio 2012

戏子无情 提交于 2019-11-28 07:07:59
How do I disable messages in the debug output windows of visual studio 2012? The thread '' (0x2360) has exited with code 0 (0x0) Since the count of such messages is so high they bother me and hide my custom debugging information written using Debug.Write . Should I highlight my custom debugging information using red instead? congusbongus Right click on the Output window for the Debug selection; here you can select which types of messages to see. The Thread Exit Messages option will be disabled in the example you gave. You can can also get to these settings at any time by searching in the Quick

debugging with visual studio using redirected standard input

巧了我就是萌 提交于 2019-11-28 06:32:01
I am debugging c++ console application with Visual studio. I exhausted of inserting the same input every time I debug this program. I would like to use the same input more times. I do this without debugging in command line with command: Program.exe < 1.in Is it possible to use debugging with standard input redirected from file??? I already tried looking in to procejt properties. I tried setting Command to $(TargetPath) < 1.in instead of $(TargetPath). I also tried setting Command Arguments to < 1.in. Niether of these method worked. I am using Visual Studio 2012. But this is probably same in

How to get non-current thread's stacktrace?

前提是你 提交于 2019-11-28 05:19:34
It is possible to get stacktrace using System.Diagnostics.StackTrace, but thread has to be suspended. Suspend and Resume function are obsolete, so I expect that better way exists. According to C# 3.0 in a Nutshell , this is one of the few situations where it is okay to call Suspend/Resume. Here's what's worked for me so far: StackTrace GetStackTrace (Thread targetThread) { StackTrace stackTrace = null; var ready = new ManualResetEventSlim(); new Thread (() => { // Backstop to release thread in case of deadlock: ready.Set(); Thread.Sleep (200); try { targetThread.Resume(); } catch { } }).Start(

'var_name'is not declared. It may be inaccessible due to its protection level.' in debug mode

偶尔善良 提交于 2019-11-28 02:52:59
问题 This behavior is in a vb.net web application solution with multiple class library projects referenced by the web app. The code compiles, but in debug mode, some functions/subroutines in the referenced class libraries have local variables that display 'var_name' is not declared. It may be inaccessible due to its protection level. in the watch and immediate windows. The mouse_over intellisense doesn't work on those local variables. In some sub/functions the variables' values are accessible

Visual Studio : Hotkey/way to step into f() in statement a()->f(b(),c(),d()) directly

拥有回忆 提交于 2019-11-28 02:45:19
问题 While debugging, I am currently at this (next) statement :- system<System_Body>()->executeFracture(calculateFracture(data)); ^^1 ^^2 How to step into executeFracture() or calculateFracture() directly and easily (without changing the code)? Hotkey? Extension? Plugin? My poor solutions With F11 , I have to step into system<System_Body>() first. I can also jump to the source of executeFracture() and press ctrl+F10 from there, but it is not convenient. Edit MotKohn and TheUndeadFish advised using

Does IIS Express support Debugging Classic ASP?

早过忘川 提交于 2019-11-27 23:49:35
I recently installed Visual Studio 2010 SP1 BETA , ASP.NET MVC 3 RC2 and IIS Express . I successfully got an MVC 3 project running along with classic ASP pages in the project with IIS Express . I was wondering if there is a way to set up Classic ASP debugging with breakpoints in Visual Studio while using IIS Express? If so, are there any tutorials / posts on how to do this? Enable ASP debugging in IIS Express: First, you need to locate the appropriate applicationhost.config file to update based on your version of Visual Studio. Before Visual Studio 2015: You can enable debugging for all web

Page uses an invalid or unsupported form of compression when debugging ASP.NET MVC app with Visual Studio 2013 Preview

时光毁灭记忆、已成空白 提交于 2019-11-27 23:06:18
While trying to debug an ASP.NET MVC project using the recently released VS 2013 Preview I get this message: Content Encoding Error The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. Please contact the website owners to inform them of this problem. In Firebug I see this error message: SecurityError: The operation is insecure Tried with Google Chrome and IE 11 and the same problem happens. What is causing this? Note: I'm on Windows 8.1 and debugging the site using IIS Express at http://localhost:7777 I can debug it just fine using VS

Visual Studio 2015 diagnostics tool does not support current debugging configuration

北慕城南 提交于 2019-11-27 22:38:57
After using VS2015 snapshot and profiling tools, I can't seem to get the diagnostics tools to work again. Every project, even new ones just say the following The Diagnostic Tools window does not support the current debugging configuration. Tried creating new and different type projects, running as administrator, deleting program data, app data, repairing and re-installing from uninstall. Anyone experienced this?, shame as they've improved this tool a lot in this version. Thanks So I resolved my issue. The Diagnostic Tools window currently does not support: Windows Store projects that are using

Stop visual studio from breaking on exception in Tasks

北慕城南 提交于 2019-11-27 22:13:43
i have the following code: Task load = Task.Factory.StartNew(() => {//Some Stuff Which Throws an Exception}); try { load.Wait(); } catch (AggregateException ex) { MessageBox.Show("Error!"); } When ever an exception is thrown in the Task, I want it to bubble up get caught in the try catch instead of visual studio breaking at the point the exception is caused. I Tried google and some suggested I add this [DebuggerHidden] on top of my method but it doesn't work Ok I found out how to do it. The answer is right here in the note section When "Just My Code" is enabled, Visual Studio in some cases

How to get ToString() to show up in Debug

為{幸葍}努か 提交于 2019-11-27 21:45:17
问题 I'd like to get ToString() to display for a class under my control in debug mode. It'd be nice if this was the first thing to show up when you hover over a variable with the mouse. Is there an attribute for this? 回答1: Mark your class with [System.Diagnostics.DebuggerDisplay("{ToString()}")] Test: [System.Diagnostics.DebuggerDisplay("{ToString()}")] class MyClass { private string _foo = "This is the text that will be displayed at debugging" public override string ToString() { return _foo; } }