visual-studio-debugging

What does Visual Studio consider “User Code”?

冷暖自知 提交于 2019-12-17 20:43:51
问题 Suppose I have a function that throws an exception. Suppose this function is called by a third-party DLL, and the third-party DLL will handle the exception I’ve thrown. If Visual Studio decides that the third-party DLL is not "user code" (as seen in the image below) then it will stop on my exception by default, even though it gets handled later. It isn’t exactly wrong to do so; it clearly explains that the exception was unhandled by user code . But what is it that makes Visual Studio call

Unable to debug VSIX project

与世无争的帅哥 提交于 2019-12-17 19:38:22
问题 I'm trying to develop my first visual studio extensions project, I have VS10 SDK installed and was able to create a new project and can build it fine, however when I attempt to debug symbols are not loaded. I know that I can debug to VSIX project since I have downloaded a sample project online and it symbols are loaded and break points are being hit fine http://weshackett.com/2009/11/configure-vsix-project-to-enable-debugging/). So must be something specifically to do with the way I have

Visual Studio 2015 diagnostics tool does not support current debugging configuration

拥有回忆 提交于 2019-12-17 16:26:59
问题 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. 回答1: So I resolved my

Stop visual studio from breaking on exception in Tasks

匆匆过客 提交于 2019-12-17 16:19:45
问题 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 回答1: Ok I found out how to do it.

How do I debug .NET 4.6 framework source code in Visual Studio 2017?

让人想犯罪 __ 提交于 2019-12-17 09:34:05
问题 Here's what I've tried: Made a new Console App (.NET Framework) in Visual Studio 2017. Added the following code: static void Main(string[] args) { new Dictionary<int, int>().TryGetValue(3, out int x); //I want to step into TryGetValue() (this is just an example) } Configured the settings listed here: https://blogs.msdn.microsoft.com/sburke/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code/ Confirmed symbols are loaded in the Modules window: mscorlib.dll Symbols loaded. 4

Can I find out the return value before returning while debugging in Visual Studio?

喜你入骨 提交于 2019-12-16 22:09:52
问题 Take the following function: DataTable go() { return someTableAdapter.getSomeData(); } When I set a breakpoint in this function, is there a possibility to inspect the returned value? go() is directly coupled to a datagrid in an .aspx page. The only way to inspect the returned datatable is to use a temporary variable. However, that's a bit inconvenient. Isn't there another way? 回答1: Not that I know of. Note that if you do add a variable, it will get removed by the compiler in release builds

Unable to start debugging in VS2015 for Azure web app

戏子无情 提交于 2019-12-14 03:43:03
问题 I'm using VS2015 Update 1 to try and debug my site which I've uploaded in Debug mode to an Azure web app (NOT a vm). I am working from my work domain. I've been following instructions similar to found here https://samlman.wordpress.com/2015/02/27/another-cool-way-to-remotely-debug-azure-web-sites/ I have: Published my website in Debug configuration Enabled Remote Debugging from the management console Made sure my VS edition is set to 2015 Enabled Websockets (from trying to connect via

Visual Studio Attach to Process - change default automatic code type (Silverlight instead of Script)

蓝咒 提交于 2019-12-14 01:53:46
问题 I'm attaching Visual Studio Debugger to IE instance which is running silverlight application, using Attach to Process dialog. In the list of available processes there are Script, Silverlight and x86 types listed for iexplore.exe, but Script code gets chosen automatically. Can this be changed? I want Silverlight to be preferred. Of course I can click Select button and pick Silverlight, but next time I'll need to attach to IIS and change these options again.. 回答1: I made a macro to do this. It

Is “vector iterator + offset out of range” assertion useful at all?

时光毁灭记忆、已成空白 提交于 2019-12-14 01:11:41
问题 This perfectly good program fails in debug mode in Visual Studio 2013: #include <iostream> #include <vector> #include <algorithm> using namespace std; void main() { vector<int> v = {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; for (auto iFrom = v.cbegin(), iTo = iFrom+5; iFrom != v.cend(); iFrom = iTo, iTo += 5) cout << *max_element(iFrom, iTo) << '\n'; } with vector iterator + offset out of range assertion failure. It fails because iTo > v.cend() , which is harmless here. What is the point of debugger

Is it possible to change what is displayed in a Visual Studio Debugger Variables window Value column for a 3rd party class?

安稳与你 提交于 2019-12-13 17:16:55
问题 When debugging there are various Variable windows (autos, locals, watch) containing columns Name,Value,Type. The value often seems to show an object's class name. In specific cases I would like to show something more meaningful based on the properties of the class instance. As a specific example, for CodeTypeReference I'd like to see a text representation of the type referenced (where valid) based on the BaseType string or ArrayElementType value, rather than seeing "System.CodeDom