debugging

How to show all asked-for Translation Strings in Rails?

When Rails functions are asking for a translation (I18n.translate), I don't want to analyze their code in order to get the exact scopes etc. How can I add a debug output into the console for every string that was asked for? Examples: I18n.t 'errors.messages.invalid', :scope => :active_record # Translation for 'activerecord.errors.mes...

Segmentation fault while embedding python in ubuntu

I have an application where I'm embedding python. It was developed on windows where it works fine, but now I'm porting it to linux with less success where it crashes in Py_Initialize(). From gdb, it seems to happen when loading the os module. gdb reports this callstack on seg fault: #0 0x002384fc in import_submodule (mod=None, subname...

During debugging, how to evaluate a piece of code in the debug target VM?

Hi all. During debugging, e.g. in Eclipse, one can evaluate Watch Expressions or Conditional Breakpoints. Typically, these are evaluated on the client side. For instance, when debugging from within Eclipse, it is Eclipse itself, not the debug target VM that evaluates these expressions. This can be quite costly, especially in the case of...

Debugging NSFetchedResultsController

Hi guys, I've come into a strange situation with my NSFetchedResultsController. I've set it up with a predicate, and the sqlite3 table contains no entries when the app is loaded. Yet my controller sais that the one section in it contains two rows! One section is fine: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {...

What does this mean in gdb?

Program received signal SIGSEGV, Segmentation fault. 0x08049795 in execute_jobs () Current language: auto; currently asm (gdb) info symbol 0x08049795 execute_jobs + 22 in section .text (gdb) ptype 0x08049795 type = int How to get the line number at which the error occurred? ...

How are debugging symbols found?

I have a project that referenced an external DLL without the PDB file (let's call it version 1). I created version 2 of the DLL with the PDB file. I was able to debug, etc. no problem. Due to some variations in the code, I deleted the PDB and went back to version 1. The /bin directory no longer has the PDB after I build but somehow, ...

Can anybody suggest a good Debugging package for PHP?

I use firebug and smarty so i get good debugging data from that but i'd like to see my database query times and page processing times as well. ...

How to sniff a caught exception in .NET on production machine?

Is there a way to find what exception was caught by .NET code from the outside of the application? I found that 3d party API throws an exception and suppresses it (I see the perf counter going up). But it doesnt shows it in trace (I tried sysinternals dbgView). What tool can show a caught exception? ...

Visual Studio debugger ignores methods when doing step-into

I'm seeing some weird behaviour debugging my C# code - I cant post my exact code but essentially I have a partial abstract base class that defines an Execute method: public abstract partial class MyBase { public abstract void Execute(); protect static object SomeMethod() { object aaa = OtherClass.GetObject(); ...

Memory Warning Level Indicator - iPhone SDK

Hello everyone, I am using a ton of timers that update images in my game, and whenever I run it, the debugger somehow gives me a memory warning indicator level. I try adding some timers through a background thread, but that made a very small difference. Is there anyway I can reduce the memory usage of my app without having to get rid of...

iPhone app running Simulator 4.0 received Sigkill

I just got the iPhone SDK 4 and I'm trying to leave off developing an app I was working on before. So I implemented both -(void)applicationDidEnterBackground:(UIApplication *)application and - (void)applicationWillTerminate:(UIApplication *)application When I click the home button in the simulator 4.0, it seems to work okay. The app ...

c++ type error message from compiler, what does it mean?

I'm using g++ on fedora linux 13. I'm just practicing some exercises from my c++ textbook and can't get this one program to compile. Here is the code: double *MovieData::calcMed() { double medianValue; double *medValPtr = &medianValue; *medValPtr = (sortArray[numStudents-1] / 2); return medValPtr; } Her...

Segfaults in malloc() and malloc_consolidate()

My application segfaults sometimes and mainly in malloc() and malloc_consolidate() when I look at the backtrace in gdb. I verified that the machine has enough memory available, it didn't even start swapping. I checked ulimits for data segement and max memory size and both are set to 'unlimited'. I also ran the application under valgrind...

Specify environmental variables as commandline parameter in a debug session of VisualStudio C#

I want to use an environment variable as a commandline parameter in a debug session. So Project Properties->Debug->Command line arguments: %TEMP% gives me not the temp path as a parameter rather than the string "%TEMP%". Of course I could resolve the environment variable to a path programmatically or copy past the correct path. But I wa...

NSDictionary inspect in debug

Hi all! I wish look inside my NSDictionary during my debug operation...what is the fastest and best way to do this?? xcode doesn't have a watch like visual studio to look the objects? thanks! ...

Ignore exceptions that cross AppDomains when debugging in Visual Studio 2010

I'm having problems with debugging an application that calls out to another AppDomain, because if an exception occurs in whatever the other AppDomain is doing, the exception bubbles up and causes Visual Studio 2010 to break no matter what. I've properly wrapped the method call that throws in a try/catch, and the exception is properly ca...

Should unimportant bugs be fixed just so that they do not distract developers?

While Joel Spolsky thinks that every bug should be fixed before new code is written, the reality in many places is that developers are very busy, and some bugs are deemed worthy while others are not. Unit testing is also often treated as nice to have. I have been chasing a mysterious bug in a critical application, and found a few minor ...

flash: is there a way to monitor a loaded flash and watch all variable changes

Hi. I've been told that there is a gaming site that you just need to upload your flash game and it automatically detects scoring and adds the scores to an online highscore table. is it possible? can i somehow using javascript or a 2nd flash file to load a flash and to debug all of it's variables without having the source? I assume tha...

Tiny PHP "standalone" server (or framework) for local debug without Apache/Nginx/Lighttpd/etc

There's manage.py runserver in Django or ruby script/server in Ruby on Rails — those familiar with one of those frameworks should already get the idea what I'm looking for. They run tiny "standalone" web server, which is perfectly enough to debug the application locally, without any need for other software (Apache/Nginx/Lighttpd/etc). I...

Step into stored procedure - canceled by user

Hi, I am trying to debug a long stored procedure in Visual Studio 2008. I have followed all the steps on this link: http://www.sqlteam.com/article/debugging-stored-procedures-in-visual-studio-2005 but I still get the same error... 'Canceled by user' and it never hits the breakpoint. Visual Studio 2008 and SQL Server 2005 are runnin...