debugging

How can I tell where my python script is hanging?

So I'm debugging my python program and have encountered a bug that makes the program hang, as if in an infinite loop. Now, I had a problem with an infinite loop before, but when it hung up I could kill the program and python spat out a helpful exception that told me where the program terminated when I sent it the kill command. Now, howev...

Print informative, well formatted mysql errors in PHP

Mysql errors are among the most common ones you see during development, and I am searching for a pleasant and informative way to output them. phpMyAdmin apparently has a decent pretty-printer for mySQL queries: However, it prints errors as simple text: Whereas in the latter example, the text after for the right syntax to use near ...

Xcode won't produce debugging information

Xcode suddenly stopped showing me variable information when I mouse over the variables. When I type "info locals" or try to print any variable it tells me there is no symbol table. I screwed around with the build directories to get Xcode to play nice with SVN. I made it place the build directory in a separate folder. This is the only th...

"Go To Definition" is greyed out but I can find variable via search in same file.

I'm debugging c# good in vs2008 SP1, .NET Framework 3.5. In a .cs file, I have this code: internal protected bool Refreshing{ get { return refreshing;} set { refreshing = value;} } elsewhere, in the same file, I have this statement: if (Refreshing) return; When I am debugging and right click "Refre...

In Chrome Extension get error Uncaught SyntaxError: Unexpected end of input

I wish I could give you more information about this problem, but that is really the problem: What does Uncaught SyntaxError: Unexpected end of input mean? I am getting it when I load the background.html file which contains all the JavaScript for my extension. What causes these types or errors? How do I go about debugging them? No line ...

General debugging log practices

Due to recent events, i am trying to figure out how much debugging logs i should use for code in general. What i have been doing is using debugging logs pretty sparingly, and just in cases where i wanted some extra information or what have you. This made sense to me, as it seems like you shouldn't log every little thing your code does, ...

How to suppress only [SWF] traces when debugging Flash applications

I'm working on an Adobe Flex application that loads lots of Flex Modules and other Flash sub-applications and Flash resources. Each time one successfully loads the flashlog.txt and Flex Console show a trace like "[SWF] filename.swf - [filesize] bytes after decompression". Specifically: [SWF] Main.swf - 1,361,299 bytes after decompressi...

Intentionally Buggy Code (Python)

This is a strange request but I'm looking for buggy Python code. I want to learn more about bugs and debuggers and I need some buggy code to work with. Unfortunately, all the code I've written is short and bug-free (so far). Preferably it's not GUI stuff (b/c I'm just starting to learn it) but anything's good. Thanks in advance ...

How to test MySQL transactions?

I have a question about testing the queries in a transaction. I've been using MySQL transactions for quite some time now, and everytime I do this, I use something like: $doCommit = true; $error = ""; mysql_query("BEGIN"); /* repeat this part with the different queries in the transaction this often involves updating of and inserting ...

How to have, Delphi source code visible during remote debugging with Delphi 2010

I'm starting with the Delphi 2010 remote debugger. There is some good information here and I can start and execute my program on the remote machine. I can't get Delphi to step through my source code though, despite the fact that when run locally, all works fine. All I get is the CPU view and any breakpoints I set get shown disabled when ...

Javascript debugging Visual studio 2008

It is supposed to be one of the great feature of VS 2008, javascript debugging. But so far, I couldn't make it work. The only way is by using the "debugger" keyword (which don't really work for me but that's another story). Do you have any clue on why it's not working ? I unchecked the "Disable script debugging..." in the IE8 options but...

Why do array[n] and array[x] where x=n return different values?

Does anyone know what may cause the read-back values of array[n] and array[x] (x=n) different from each other? EDIT: Following is a compilable code to illustrate the problem I encountered. If you run the following code, you won't see any problem. I am just using it to describe the problem I saw in my original program which is a simulato...

Function abruptly returns when it shouldn't

I am working on an Operating Systems assignment for one of my summer classes. The teacher has provided an object file that provides functions that mimic the behaviour of a disk device driver. We are then to write a file system API that uses the disk device driver in C. I am working on my file system format function named Format() which ...

Breakpoint at exception in Eclipse - how to examine Exception object?

I feel like I'm missing something very simple here. I have Eclipse set up to break on all exceptions. So, let's say that it breaks on an AssertationFailedException. The Debug window will show that thread suspended and has the following data: Thread [Thread-1] (Suspended (exception AssertionFailedException)) ContactManager.addCon...

Valgrind losing symbol info

After running Valgrind, the resultant log file contains a number of errors that look like Conditional jump or move depends on uninitialised value(s) at 0x3D9863AA: ??? by 0x3D986287: ??? by 0x3D9854AC: ??? Uninitialised value was created by a heap allocation at 0x7FCC050: operator new(unsigned int) (vg_replace_malloc.c:214) by...

Eclipse heap walk

When debugging Java code, Eclipse has a feature that allows it to find all instances of a given type (via context menu in the Variables window). Is there any way to filter these programatically? For instance, I want all instances of class FieldInstruction where the_instance.getType().getName().equals("somestring") Evaluates to t...

How do I debug a arm9 2.4.19 linux hang?

Hi everyone, I'm trying to debug this arm9 ... it's running some variation of Linux 2.4.19. When I load a pci driver, the arm9 just hangs and reboots. I've tried to enable to kernel hacking options in the menuconfig, but I don't see any error messages at all. Just a hang, and a reboot. That's all. What else could I try? I've neve...

How to get Android project and std Java project to play nice?

I can now get our Android project to talk to our non-Android project. But there's still an issue: I are trying to have an Android class call a non Android Hello World class. I tried compiling our non-Android Hello World class in a separate Eclipse workspace. I then packaged it into a jar. I imported that jar into our Android Hello Worl...

System.OutOfMemoryException on accessing an Interop

I am using Interop.WinHttp and when I run the application it gives me this exception on a line of code that is using Interop.WinHttp like this: System.OutOfMemoryException: Retrieving the COM class factory for component with CLSID {91E2EAD3-AB7E-4D5C-88DE-F7FA382172BC} failed due to the following error: 8007000e. WinHttp.WinHttpReques...

Can only run AutoCAD 2010 or 2011 when debugging from visual studio

I've noticed recently that AutoCAD gets slower and slower after as I debug it, close, then debug again. In addition AutoCAD just freezes when I try to open it without debugging (in or out of visual studio). Has anybody else ran into this problem before and what is the solution? ...