visual-studio-2012

Visual Studio memory leak detection not printing file name and line number

若如初见. 提交于 2020-07-06 09:41:13
问题 I want to check my program for memory leaks and found this Microsoft article. I thoroughly followed the article and added #define CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> and _CrtDumpMemoryLeaks(); when the program exits. It properly dumps all the memory leak info in my output window, but here's the problem: It doesn't print the file name and line number where the memory leaks are! It says in the article that with #define _CRTDBG_MAP_ALLOC it prints the file name and line

Visual Studio debugger - source search directory

一个人想着一个人 提交于 2020-07-03 06:51:10
问题 I have a crash dump (minidump, mdmp format) for an executable (native x86 code) compiled on a different computer. I have the pdb + exe corresponding to the crash dump, they are located next to the crashdump, and debugger recognizes them correctly. The pdb references sources on a path which is not available on my computers (say E:\Project ). When I first opened the crash dump, the debugger has asked me for the source location. I pointed it to E:\B\Project on my computer, however once the

Visual Studio debugger - source search directory

徘徊边缘 提交于 2020-07-03 06:50:48
问题 I have a crash dump (minidump, mdmp format) for an executable (native x86 code) compiled on a different computer. I have the pdb + exe corresponding to the crash dump, they are located next to the crashdump, and debugger recognizes them correctly. The pdb references sources on a path which is not available on my computers (say E:\Project ). When I first opened the crash dump, the debugger has asked me for the source location. I pointed it to E:\B\Project on my computer, however once the

Setting the message of a custom Exception without passing it to the base constructor

时间秒杀一切 提交于 2020-06-24 10:52:24
问题 I want to make a custom Exception in C#, but in theory I do need to do a little parsing first before I can make a human readable ExceptionMessage. The problem is that the orginal Message can only be set by calling the base constructor of Messsage , so I can't do any parsing in advance. I tried overring the Message property like this: public class CustomException : Exception { string _Message; public CustomException(dynamic json) : base("Plep") { // Some parsing to create a human readable

Setting the message of a custom Exception without passing it to the base constructor

♀尐吖头ヾ 提交于 2020-06-24 10:52:06
问题 I want to make a custom Exception in C#, but in theory I do need to do a little parsing first before I can make a human readable ExceptionMessage. The problem is that the orginal Message can only be set by calling the base constructor of Messsage , so I can't do any parsing in advance. I tried overring the Message property like this: public class CustomException : Exception { string _Message; public CustomException(dynamic json) : base("Plep") { // Some parsing to create a human readable

Can I control the number of digits displayed in debugger windows for float and double variables?

末鹿安然 提交于 2020-06-22 13:43:09
问题 In Visual Studio 2012, I'm looking for a way to customize the default display of floating point types in the Autos, Locals, and Watch windows. I'm familiar with the Native Visualizer (Natvis) utility, but don't see any debugger formatting facilities to accomplish this. Likewise, I'm not aware of any means to override the default display of any primitive types (aside from enabling hex). The goal would be to create display strings with fewer digits expanded for types corresponding to points,

Can I control the number of digits displayed in debugger windows for float and double variables?

点点圈 提交于 2020-06-22 13:43:04
问题 In Visual Studio 2012, I'm looking for a way to customize the default display of floating point types in the Autos, Locals, and Watch windows. I'm familiar with the Native Visualizer (Natvis) utility, but don't see any debugger formatting facilities to accomplish this. Likewise, I'm not aware of any means to override the default display of any primitive types (aside from enabling hex). The goal would be to create display strings with fewer digits expanded for types corresponding to points,

ERROR: LNK 2019 : unresolved external symbol _imp_CrtDbgReportw in Visual Studio

浪尽此生 提交于 2020-06-22 09:54:07
问题 I have written a program that splits a string when the respective delimiter occurs. But a different error is occurring like : Error 1 error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: char const & __thiscall std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<char> > >::operator*(void)const " (??D?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@QBEABDXZ) Source.cpp Using Object_Type Input I

Static lib vs DLL in visual studio

六月ゝ 毕业季﹏ 提交于 2020-06-16 11:31:28
问题 I have built VTK in my computer with both dll and .lib files. When I want to create a project that uses VTK, I have to include the header files and link .lib files in project properties. In addition I have to add the .dll files in to the project path as well. I have several questions regarding this, What is the difference between .libs and .dll files? Is it possible to create a project with only using either .dll or .lib files. (I can link the .lib files and not add dlls to path or add dlls

What are skipped tests in visual studio?

别说谁变了你拦得住时间么 提交于 2020-06-11 16:16:41
问题 I tried to run Visual Studio tests in ASP.NET MVC by pressing "Run All" but all tests were skipped. Why did this happen and how can I run all tests? Here is a screenshot: 回答1: Check if the test has a Ignore attribute. 回答2: Tests which use the Inconclusive result will appear as skipped. So VS 2010 inconclusive == VS 2012 skipped ex: Assert.Inconclusive("This test didn't exactly fail, but we can't be certain the results are good.") Will read as skipped in the test window 回答3: I got this in VS