debug-build

What does ConditionalAttribute on an Attribute do?

末鹿安然 提交于 2019-12-22 12:07:48
问题 I know what ConditionalAttribute does. The docs say it can also be applied to a class, if it's derived from Attribute : [Conditional("DEBUG")] public class FooAttribute : Attribute { } But how does that custom attribute behave? (Is it stripped out of a release build?) 回答1: @RicardoPontual's comment gave me an idea. I did this: [Conditional("DEBUG")] public class FooAttribute : Attribute { } [Foo] public class Bar { } I compiled in debug mode , and loaded the DLL in ILSpy (it's a disassembler)

Running vc2008 debug builds on non-dev machines

ぐ巨炮叔叔 提交于 2019-12-09 00:18:10
问题 I'm building my app in vc2008 and testing it on a network of machines. Is there any way, other than installing Visual Studio 2008, to run a debug build of a C++ program on another machine? (i.e. that doesn't have vc2008 installed) Installing the redist package only installs the release mode support DLL's for vc2008 programs. Currently it complains that "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.",

What does ConditionalAttribute on an Attribute do?

六月ゝ 毕业季﹏ 提交于 2019-12-06 10:39:20
I know what ConditionalAttribute does. The docs say it can also be applied to a class, if it's derived from Attribute : [Conditional("DEBUG")] public class FooAttribute : Attribute { } But how does that custom attribute behave? (Is it stripped out of a release build?) @RicardoPontual's comment gave me an idea. I did this: [Conditional("DEBUG")] public class FooAttribute : Attribute { } [Foo] public class Bar { } I compiled in debug mode , and loaded the DLL in ILSpy (it's a disassembler). This is what I found, as expected: [Foo] public class Bar { } Then I compiled in release mode , and loaded

STL Alternative

て烟熏妆下的殇ゞ 提交于 2019-12-03 03:12:09
问题 I really hate using STL containers because they make the debug version of my code run really slowly. What do other people use instead of STL that has reasonable performance for debug builds? I'm a game programmer and this has been a problem on many of the projects I've worked on. It's pretty hard to get 60 fps when you use STL container for everything. I use MSVC for most of my work. 回答1: EASTL is a possibility, but still not perfect. Paul Pedriana of Electronic Arts did an investigation of

STL Alternative

≡放荡痞女 提交于 2019-12-02 16:41:14
I really hate using STL containers because they make the debug version of my code run really slowly. What do other people use instead of STL that has reasonable performance for debug builds? I'm a game programmer and this has been a problem on many of the projects I've worked on. It's pretty hard to get 60 fps when you use STL container for everything. I use MSVC for most of my work. EASTL is a possibility, but still not perfect. Paul Pedriana of Electronic Arts did an investigation of various STL implementations with respect to performance in game applications the summary of which is found

Inverse Heisenbug - Unit test fails only when debugger is attached

荒凉一梦 提交于 2019-12-01 19:35:16
I recently fixed a defect in our product, the symptom of which was an access violation caused by accessing a dangling pointer. For good practice I added a unit test to ensure that the bug doesn't come back. When writing a unit test I will always back out my defect fix and ensure the unit test fails, otherwise I know it isn't doing its job properly. After backing out the defect fix, I discovered that my unit test still passes (not good). When I attached a debugger to the unit test to see why it passes, the test failed (i.e. an exception was thrown) and I could break and observe that the call

“application configuration is incorrect” and “side-by-side configuration is incorrect” running VS2008 64-bit debug build

 ̄綄美尐妖づ 提交于 2019-12-01 15:54:43
问题 I am working on a 64-bit OS windows 7 ultimate machine VS2008 with 64bit addon. I have successfully build my projects in both 32 & 64 bit, debug and release config. The 64 bit debug is not launching; it gives the error: Unable to Start program xxx This application has failed to start because application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more retails see application event log. I ran the dependency

Running vc2008 debug builds on non-dev machines

半城伤御伤魂 提交于 2019-11-30 15:27:14
I'm building my app in vc2008 and testing it on a network of machines. Is there any way, other than installing Visual Studio 2008, to run a debug build of a C++ program on another machine? (i.e. that doesn't have vc2008 installed) Installing the redist package only installs the release mode support DLL's for vc2008 programs. Currently it complains that "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.", which I assume is code for "I'm missing DLL's". puetzk You can't, because there's no installer redist