debugging

Debugger Visualizer to generate Object Initializer code

ε祈祈猫儿з 提交于 2020-01-01 04:24:16
问题 We have a bug to fix, and like any good TDD practitioner, I want to write a failing test to represent the bug first. The bug is in a method that takes a rather complex type as input. The bug will only reproduce when the complex type has a certain combination of property values set. So far I have reproduced the bug and, in the debugger, can view the run-time value of the complex type. Now I need to create that complex type in the "Arrange" section of my unit test so that I can feed it to the

Easiest way to develop/debug a Windows service

喜夏-厌秋 提交于 2020-01-01 03:46:10
问题 I'm developing a Windows Service in VB.NET 2008, but I feel like I'm going to have an aneurysm. To debug the service, I've added a 15 second wait to the initialization code, which gives me time to start the service and attach the .NET debugger before anything happens, so I can hit breakpoints and such. I really miss "integrated" debugging with this type of workaround, and testing seems to be a huge pain. What's the best way to do "regular" debugging of a Windows Service that's in development?

Debugging C# assembly launched by embedded mono runtime?

删除回忆录丶 提交于 2020-01-01 03:30:06
问题 I am talking about a small game engine using C# for game programming. So, I have a C++ app embedding mono runtime (I call it 'launcher'). And I have an assembly written in C# which is my game engine class library. The launcher launches the assembly as it is suggested in Embedding Mono. And now the interesting part! The launcher implements in C++ miscelaneous functions which are exposed to the mono runtime as internal methods of my game engine classes. That is why my game engine assembly is

Finding a bug using Xcode - attempt to insert nil value

淺唱寂寞╮ 提交于 2020-01-01 03:29:08
问题 I am getting a random bug in my app, which is causing it to crash. The problem I am facing is XCode doesn't tell me where the crash is happening only the below information. Can someone tell me how I can find out where I might be able to find the problem within the code? It must be crashing at the same point as when the app does crash it always shows the below. * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to

Google Maps SVG image marker icons not showing in IE11

你说的曾经没有我的故事 提交于 2020-01-01 03:16:31
问题 There is an issue on a site I have been working on that for some reason the SVG image markers are not showing up in IE 11. I have two sets of markers: the default zoomed out has PNG markers for the suburbs zoomed in has address specific numbered SVG ones I use a fallback for older browsers that don't support SVG (testing it with modernizr). I am using the old Google Chart markers for IE 11 to get it to work (testing the user agent string to id it). I want to know if anyone has an idea as to:

Determine if swf is in a “debug” player or mode

久未见 提交于 2020-01-01 03:15:48
问题 Is there a way using Flash (CS3+AS3) to determine if the published swf is running in a debug player or in Flash's debug mode? I'm aware that Flex provides the ability to setup different build targets (release/debug) and that you can use something like CONFIG::debug for #ifdef style inclusion of code at compile time. I'm imagining something like System.isDebug() but can't find anything. I want to use this because there's debug functionality in my app that I definitely don't want to be

How can I prevent using the Settings.bundle in Release build v.s. Debug build?

女生的网名这么多〃 提交于 2020-01-01 03:11:47
问题 I need to have a settings.bundle in our debug build, but don't want to have it in our Release. How do I approach this? Is there a runscript I can use to remove it from the copy bundle resources building phase? 回答1: You can write a script to delete the setting bundle altogether for a certain build configuration. For the target, under "Build Settings", there is an option to run a script. This script should do what you need: BUILD_APP_DIR=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app if [ "

How to solve Private bytes (Native memory) leak?

自作多情 提交于 2020-01-01 02:44:08
问题 I'm developing a C# application which seems to have a leak. I've used memory profiler and found that my private bytes keep increasing but Bytes in all Heaps do not, which means that probably it's a native memory leak Now I'm stuck, how do I find memory leaks in native code ? 回答1: First, if you have a dump of the leaking process, you can open it in WinDbg and issue the command : !address -summary if RegionUsageHeap is large, then it should be a native memory leak if RegionUsageIsVAD, then it

How best to debug a crash within objc_msgSend?

守給你的承諾、 提交于 2020-01-01 02:31:09
问题 I have a crash taking place when an NSAutoreleasePool drains. Presumably the pool is trying to deallocate an object that has been prematurely released by another piece of code. The crash I have is in the midst of objc_msgSend as it is trying to send a message to an object that doesn't exist anymore. Given the stack state, what tips/tricks/processes/ gdb commands do I have at my disposal to get information about the object in question and/or the point at which the illegitimate deallocation

View javascript events in browser

こ雲淡風輕ζ 提交于 2020-01-01 02:17:55
问题 I'm using Firefox. Is there something out there that will show me all the JavaScript events that are getting triggered in real time? 回答1: You can right-click an element in Firebug's HTML tab and click Log Events. You will then see every event received by that element in the Console tab. You can even click one of them to explore the properties of the event object. 回答2: I have been using Visual Event for a few years now. It's a simple bookmarklet, meaning you just have to drag it into your