visual-studio-debugging

Unable to step into PresentationFramework

无人久伴 提交于 2019-12-24 19:06:27
问题 I am trying to step into PresentationFramework, but the debugger just skips ahead to the next line. I have loaded the symbols using the Modules window. I have enabled .NET Framework source stepping I have disabled Just My Code I have used resharper to generate pdb and decompile the source, but stepping through those is really difficult. Partly because many variables have generic names (num1, num2 etc), but mostly because the debugger seemingly just around somewhat randomly - sometimes

VB.NET Call Stack in Microsoft Visual Studio - Wrong Line of Source Highlighted?

扶醉桌前 提交于 2019-12-24 14:36:07
问题 I seem to be having an issue using the call stack viewing functionality of Microsoft Visual Studio 2010 Professional. During debugging, my application crashed, so I inspected it with the call stack view. The offending line was contained within called showInDGV(...) nothing exciting, just trying to read an uninitialized variable or something... All well and good, so next thing I did was check to see where the call to showInDGV() was coming from, because it is called from multiple places. When

Debugging shell extensions in Win 7 and 8.1

可紊 提交于 2019-12-24 12:34:17
问题 I would genuinely appreciate help with this. I have spent hours trying to solve it. I wrote a small extension with VCPP6 (yes, I know. no need to tell me) to display the content of a particular DOS file as a thumbnail in Explorer using IExtractImage under XP. Debugging proved easy - I shut down explorer and hit F5. Clicking a file of the desired type resulted in a thumbnail. Breakpoints all active. Upgrading to VS2012 (same happens with VS2013 Express) and using IThumbnailProvider, the same

How to configure xdebug stacktrace to link to and open files in VS Code

柔情痞子 提交于 2019-12-24 11:11:45
问题 When xdebug provides a stacktrace, it can create links to open files in your text editor at a particular line. For instance, the following configuration will open files in Sublime, if the subl handler is installed: xdebug.file_link_format="subl://open?url=%f&line=%l" How does one set file_link_format for VS Code? 回答1: Here's the documentation of the URL format for VS Code. Thus, the xdebug config is: xdebug.file_link_format="vscode://file/%f:%l" 来源: https://stackoverflow.com/questions

Loading specific test file for debugging MSProject Add-In

核能气质少年 提交于 2019-12-24 08:59:07
问题 I am developing a MSProject add-in with VSTO and I have a question about debugging. How do I use the Start Option->Command line arguments to load a specific MS Project file? I have tried using [drive:][path]filename.mpp but the file doesn't load. Otherwise everything is fine. I can load a file manually and debug properly. Thanks for any assistance. 回答1: You can use the following command line example to load MS Project with a specific MPP file: winproj "c:\projects\Annual Report Preparation

Visual Studio debugger highlights multiple lines instead of just the current line

有些话、适合烂在心里 提交于 2019-12-24 08:25:23
问题 Weird one here, My fresh install of Visual Studio 2017 (Version 15.6.7) is showing multiple lines in yellow when I try to step-through debug, like so: It seems to be pointing to the correct line that it's on, but also several others below it. Maybe it's something to do with indentation, or scope, I'm not sure. But it's a little misleading to myself and other devs when I do paired-programming. I've tried Googling this issue and have found nothing, and I've looked at the text formatting in VS

how can I prevent swallowed exceptions in 3rd party libraries from triggering the VS debugger?

偶尔善良 提交于 2019-12-24 07:48:40
问题 using System; using System.Diagnostics; using NUnit.Framework; namespace TestExperiment { [TestFixture] internal class TestAAA { [Test] public void Test_ThrowSwallowThirdParty() { ThrowSwallowThirdParty(); } [Test] public void Test_ThrowSwallowLocal() { ThrowSwallowLocal(); } [DebuggerStepThrough] [DebuggerNonUserCode] [DebuggerHidden] public void ThrowSwallowThirdParty() { ThirdPartyLibrary.ThrowEmbedded(); } [DebuggerStepThrough] [DebuggerNonUserCode] [DebuggerHidden] public void

Where did the exception assistant go for Visual Studio 2015?

那年仲夏 提交于 2019-12-24 07:48:23
问题 For a handled exception in Visual Studio 2013 I could view the exception dialog in a catch block by clicking the red exception helper icon. In Visual Studio 2015 this is missing. The dialog still shows when the exception is thrown, so that is not the issue. Though there is a workaround in this answer, this doesn't provide the functionality of the exception dialog (e.g. copy to clipboard). 回答1: Apparently it's no longer there, so you have to watch $exception , which always has the current

How can I detect whether a debugger is attached *and* a breakpoint has been set or hit?

喜夏-厌秋 提交于 2019-12-24 07:14:12
问题 I know I can use Debugger.IsAttached to detect whether a debugger is attached, but I want to be able to do something like if (Debugger.IsAttached && Debugger.BreakpointIsSet && Debugger.BreakpointHitCount > 0) timeout *= 100; someEvent.WaitOne(timeout); The reason is some of my testing scenarios involve activity on other threads. Viewing things under the debugger naturally disturbs this process. I'd like my main testing thread to block longer while I'm stepping after a breakpoint hit on some

How can I detect whether a debugger is attached *and* a breakpoint has been set or hit?

萝らか妹 提交于 2019-12-24 07:14:08
问题 I know I can use Debugger.IsAttached to detect whether a debugger is attached, but I want to be able to do something like if (Debugger.IsAttached && Debugger.BreakpointIsSet && Debugger.BreakpointHitCount > 0) timeout *= 100; someEvent.WaitOne(timeout); The reason is some of my testing scenarios involve activity on other threads. Viewing things under the debugger naturally disturbs this process. I'd like my main testing thread to block longer while I'm stepping after a breakpoint hit on some