visual-studio-debugging

VS2017 blocking on non-existing object files when debugging with pdb file

雨燕双飞 提交于 2019-12-07 03:42:15
问题 We are in the process of switching Visual C++ projects to the vc141 toolchain (VS 2017). We have encountered a problem where Visual Studio is unable to use a .pdb file whose source .obj files don't exist anymore (for example because they have been compiled on a build server). Let's take a very simple executable project: #include <iostream> int main() { std::cout << "Hello world\n"; std::cin.ignore(); } The .vcxproj file is all default, except for <GenerateDebugInformation>true<

How to trace async database operations in Intellitrace Events?

巧了我就是萌 提交于 2019-12-07 01:40:15
问题 Im trying to see some queries that my application using EntityFramework does. In my method wich is not async i can see the queries normally: public List<Tool> GetTools() { return EntityContext.ToList(); } But if its like: public Task<List<Tool>> GetTools(int quantity) { return EntityContext.Take(quantity).ToListAsync(); } Is it possible to get the queries of a async method in IntelliTrace Events? Thanks. 回答1: With EF you can debug to the output window and command line easy enough. Here is a

Console.Writeline working on x86 but not x64

 ̄綄美尐妖づ 提交于 2019-12-07 00:48:34
问题 I'm testing a project in visual studio 2012. When I run my code in x86, Console.Writeline shows up in the output window. However, when I run it in x64, it does not. I understand I can use System.Diagnostics.Debug instead, but I would really like to understand why Console.Writeline is not working, or if there is a setting somewhere. Thanks. Edit: An observation: The Visual Studio hosting process is disabled for both builds. When I enable it, all Console.Writeline messages show up for both x64

Setting the “Title” value displayed in Visual Studio's “Attach to Process” dialog?

旧城冷巷雨未停 提交于 2019-12-06 18:55:47
问题 When you choose Debug / Attach to Process in Visual Studio, the dialog displayed has a "Title" column. By default this shows the caption of the main window belonging to the process. For example, it might display "It was a dark and stormy night - Notepad". How can I set this field for an application that doesn't have a main window (e.g. a Windows service)? I have multiple services running with the same executable name, and I'd like to be able to easily differentiate between them when attaching

Quick way to toggle 'break on all exceptions' in VS2012?

為{幸葍}努か 提交于 2019-12-06 16:40:15
问题 I regularly find it very useful when debugging to switch on the Common Language Runtime Exceptions: Thrown option in Visual Studio's Debug > Exceptions screen. I'd like a quick way of doing this, since it's always the same checkbox I'm toggling and that screen is very slow to load. In previous versions, it was possible to do this with a macro, but macros have sadly been removed from VS2012. Does anyone know of a quick/easy way to do this with a plugin/extension/keyboard shortcut? 回答1:

Hover Tooltip stopped working in Visual Studio 2012 Express for Web?

て烟熏妆下的殇ゞ 提交于 2019-12-06 16:21:24
Was working on a new solution, new project in Visual Studio 2012 Express for Web. For some reason, the tooltip info that normally appears for variables and objects when I hit a breakpoint while debugging is no longer working, even for my older solutions/projects that used to work fine. The breakpoints work fine, but no info at all appears when I hover over variables, etc. Have no idea if this has anything to do with it, but I did set this new solution/project to ASP 4.5. Repairing Visual Studio did not work. I uninstalled and reinstalled Visual Studio. My problem now seems to be resolved. 来源:

Removing Debug and Release Configurations from Visual Studio 2008

假装没事ソ 提交于 2019-12-06 15:34:59
I modified the default Debug configuation, so that the output directories resemble $(SolutionDir)$(PlatformName)/$(ConfigurationName) . Next, I created debug variations, DebugStatic and DebugDll , to be more explicit about the target being created. I created them by copying the Debug configuration. In similar fashion, I created ReleaseDLL and ReleaseStatic from the modified Release configuration. Using Configuration Manager , I removed the Debug and Release configurations. The Debug and Release configurations still show up in the Batch Build window and also in the Configuration drop down box

How to pass multiple commands arguments in visual studio?

半腔热情 提交于 2019-12-06 09:44:22
I am working on a compession/decompression project using the LZMA SDK. The main program contains some arguments that I must use to run the application To run it from the command line, I use : ./LzmaUtil.exe e input.elf output.elf I'm using VS 2013 , so i have added e in.elf out.elf to the commands arguments, I rebuild the project (the executable file in generated) but nothing seems to happen when I press RUN. Note that I have the input.elf in the debug folder were the .exe is present there, and the , the flag e is used to compress the file and output.elf is the compressed file. The main

Is there any way to see the full stack trace across multiple threads?

▼魔方 西西 提交于 2019-12-06 09:06:15
问题 In C# multi-threaded programming, when method A() calls method B() in a new thread, e.g. by using something like this: Task A() { // ... // I want B to run in parallel, without A() waiting for it. Task.Factory.StartNew(B); } void B() { // I attach a debugger here to look at the Call Stack. // But that is empty and I can't see that A() actually called it (logically). // Also Environment.StackTrace is pretty much empty of that path. } In other words inside method B() the stack trace doesn't

Visual Studio - how to attach debugger to restarted application?

安稳与你 提交于 2019-12-06 08:42:56
问题 I have an application in C++ developed in VS2010. This application has an ability to restart itself when needed (some changes that requires it to reboot). Now there's some bug that occurs only under certain circumstances on the beginning of the new instance after the restart. The problem is that I can't find out what it is, because the new instance does not have the debugger attached (VS debug mode ends with the initial instance closing). Any idea how to automatically attach a debugger to the