debugging

Need help identifying a subtle bug.. in IIS? The Session? Elsewhere..?

I have a very subtle bug that I'm having trouble identifying. Background: We have 2 sites running off the same application on the same web server. SiteA -- accessed by www.SiteA.com SiteB -- accessed by www.SiteB.com When the request first comes in, the siteId is identified based on the Host and stored in the Session as follows:...

Debugging in Visual Studio

what is the difference between start Debugging and Start Without Debugging in Visual Studio while running a program ? ...

In visual studio 2010 how can you debug a class

When I set a breakpoint in a class then access a method, debugger does not hit breakpoint. What would be best way to debug a class? ...

Cannot find or activate logging in Wordpress

Hi, I am struggling to activate wordpress logs. No way in hell I was able to do that. I tried all recommendations. No success. I have done: define('WP_DEBUG', true); @ini_set('log_errors','On'); @ini_set('display_errors','On'); @ini_set('error_log',TEMPLATEPATH.'/error.log'); I am using wordpress on windows using IIS server on my d...

Debugging monit

I find debugging monit to be a major pain. Monit's shell environment basically has nothing in it (no paths or other environment variables). Also, there is no log file that I can find. The problem is, if the start or stop command in the monit script fails, it is difficult to discern what is wrong with it. Often times it is not as simple ...

"source not found" for jsp in eclipse

It is utterly frustrating. I can set breakpoints in the jsp, and they work, however the source does not get loaded into eclipse and I see the blank page with source not found message. I have done the add sources thing and also in the debug configuration I added my jsp src directory. This is a regular eclipse project not WTP, beacuse out...

Java regex confusion

I hate ask stupid questions like this, but why doesn't my code do what I expect? Java code in a main method: String s = "\"The fat-dog [ruffus] @nd the stupid-cat [*mewzer*] don't like each other!\""; String[] tokens = s.replaceAll("[\\x27]+", "").replaceAll("[^a-zA-z_\\x2D]+", " ").replaceAll("\\s+", " ").trim().split(" "); System.ou...

Reporting Services: Exported to Excel results are different than the ones viewed on IE

I'm having this problem: The SQL Server holds a said value, let's say 990.30, the Reporting Services Report show a different value (948.33) when viewed online, in the brower and a third value (912.22) when the report is exported to Excel. There are no formulas on Excel, just plain values. Also, there's no formula on the layout of the r...

apply decorator to all django error views

Hi I've got a Http BasicAuth decorator wrapped around most of my views in django on my testing site and no BasicAuth on my production site. If debug = false it simply returns the view, otherwise it does a BasicAuth password check. I just discovered that the nice debug error pages are still visible to any little hacker, though. (Obvious...

Exception handling strategy

Imagine you have some code that could potentially throw an exception. For example, you try to send an e-mail message to a mail server, or write a file to disk while you’re not sure if you have the right permissions to do so. What kind of exception handling strategy would you use to avoid the exception from being displayed in the browser?...

iPhone Crash Log: Failed to Resume in Time

I am looking at my crash logs and noticed "failed to resume in time" Application Specific Information: com.myApp.MyApp failed to resume in time elapsed total CPU time (seconds): 0.680 (user 0.350, system 0.330), 7% CPU elapsed application CPU time (seconds): 0.130, 1% CPU How can I resume in time? ...

Can I make the VS debugger print a log message when reaching a line?

Sometimes I don't want to break on reaching a line. I just want a message to be printed. Let's call it a logpoint by analogy with breakpoints. I want an output format similar to this: [Debugging] Foo.PerformCycle(): 15 [Debugging] Button.Repaint(): 1 Meaning that first I hit a logpoint on line 15 of method Foo.PerformCycle(), th...

Visual C++: Difference between Start with/without debugging in Release mode

What is the difference between Start Debugging (F5) and Start without Debugging (Ctrl-F5) when the code is compiled in Release mode? I am seeing that Ctrl-F5 is 10x faster than F5 for some C++ code. If I am not wrong, the debugger is attached to the executing process for F5 and it is not for Ctrl-F5. Since this is Release mode, the comp...

Using windbg for the first time to debug a process which shuts down without warning

Hi, I have a process which, when I click on a button on its UI, launches another process. This process it spawns shuts down without warning or any clues in the logs. How should I use windbg to understand this problem? Furthermore, what do I put for the symbol files path? To download the symbols from the MS symbolserver. I am not sure i...

Can I debug Matlab Code started via Matlab engine?

Hi, I try to run and debug a script file from the matlab engine. Using breakpoints in my C++ program, I could open a Matlab editor and set a breakpoint in my script. When I continue the C++ program, the breakpoint gets hit, but Step through or similar commands do not work (as well as inspect variables or continue running). Is there any w...

How to prevent expected exceptions from breaking the debug test run?

When running MSTEST unit tests in debug mode, the execution stops in every expected exception that is thrown. My test looks like this [TestMethod()] [ExpectedException(typeof(ArgumentNullException))] public void ShouldThrowExceptionWhenPassingNull() { object data = null; target.CheckNull(data); } the target method looks like t...

Visual studio app running extremly slow with debug

I have a native c++ program which runs > 20 times slower when started with Debug (F5) but runs at normal speed when using start without debug (Ctrl+F5). Is there some setting I did choose wrong or something? [Update] It does not matter whether I use a debug or release build. Also if I use Windbg the program is a magnitude slower. [/Upd...

Eclipse CDT: Loading debug symbols for an external shared libraries

Hi, I'm trying to debug into a third-party library (GTS). I installed the shared library and its debugging symbols from the Synaptic Package Manager in Ubuntu. I also downloaded the source files for the library from Sourceforge. I'm using Eclipse CDT to debug one the provided examples, and I would like to go into the library's code. Th...

python function fails to return unless the last statement is slow

I'm working on a subclass of threading.Thread which allows its methods to be called and run in the thread represented by the object that they are called on as opposed to the usual behavior. I do this by using decorators on the target method that place the call to the method in a collections.deque and using the run method to process the d...

Debugging both .net and stored procedure in VS 2008 together

I know we can debug the stored procedures in Visual Studio but is it possible to debug the .NET code and Stored Procedures together? I mean if my .NET code calls a stored procedure, whether my debugger will still continue with the stored procedure step by step. ...