debugging

Why can't I declare new variables in the immediate window?

This could save me so much time. Sometimes I find myself writing things like this in the watch or immediate window: MyObject.Function1.Fuction2.Fuction3.Fuction2 Instead I could just declare several new variables and do this in a more structured way. However doing this is not allowed. Is there some way that i can do this? Is there...

Running form application created in Visual Studio on the other computer

Hi i create my form application in VS 2008. I write in C#. I'm trying to run my app on the other computer (without VS). I moved all project files, i go to project folder\bin\Debug\my_app.exe and it doesn't work. System automatically close application. Why? What can i do to fix that problem? / sorry for my english ...

Find what functions were called (from a variable's perspective)

Hey all, I'm trying to figure out how to know what has been done to a variable. Here's an example: function a($hello) { $out .= strtoupper(ucwords(strtolower($hello))); return $out; } echo function_trace('$hello') // returns array(strtoupper,ucwords,strtolower) Thanks! Matt ...

What's the perror() equivalent for error codes in OpenCL?

If I have something like: err = clEnqueueReadBuffer(cmdQueue, output, CL_TRUE, 0, sizeof(float) * data_sz, &results, 0, NULL, NULL); I'd like to do: if (err != CL_SUCCESS){ perror("Read Failed!"); } But the error constants like "CL_HOST_OUT_OF_MEMORY" and the like are (understandably) not known to perror(). I could go around g...

Debug Maven project in Eclipse

I am following below link to try to debug my maven project in Eclipse: http://mahertb.blogspot.com/2006/08/debugging-maven-web-application-with.html Somethings go fine until it throws an exception when I run it: org.codehaus.classworlds.Launcher class is not found. But I've set D:\Installs\apache-maven-2.2.1\boot\classworlds-1.1.jar in...

How to run the rails console in debug mode in Aptana Radrails.

In Apatana Rad Rails, I want to run the rails console in debug mode. When I launch the debugger as shown below, debugger doesn't honor the break points. debug script/console I am able to run the rake tasks in debug mode by giving a similar command, i.e. debug rake db:migrate Any pointers will be highly appreciated. ...

Exceptions not being caught

We have following code: try { // some code throwing MyException } catch (MyException ex) { // [1] // no (re)throw here } catch (Exception ex) { if (ex is MyException) { // [2] } } If we run the code without a debugger attached, everything runs fine. However, IF we debug the code, we don't get to point [1] b...

How to debug unreleased COM references from managed code?

I have been searching for a tool to debug unreleased COM references, that usually cause e.g. Word/Outlook processes to hang in memory in case the code does not call Marshal.ReleaseCOMObject on all COM instances correctly. (Outlook 2007 partially fixes this for outlook addins, but this is a generic question). Is there a tool that would ...

Deploying WPF application: .NET 3.5 issues

Hi all, Users around my country are currently beta-testing our application. My app uses WPF & Linq, so I need .NET 3.5 installation. On most system, everything works find, including automatic installation on .NET 3.5 on machines that do not have that installed yet. However, on one machine (XP SP2) my application does not run. The user ...

Need Java https proxy which can be enhanced to emulate production https proxy behaviour

I have a production environment which require access through a proxy server. Occasionally said server returns blank responses badly confusing the Metro web service library causing all kinds of interesting RuntimeExceptions. I believe the proxy is Squid. In order to handle these better, I would like to set up a similar scenario here wi...

A strange bug, is Mysql asynchronous?

Hello, I have a strange bug. I launch a PHP Unit test Suite. At the beginning, it executes a big query to initialize the database. If I put a breakpoint just after the execution of the sql, there is no problem and my tests pass. If I don't put any break point, they don't pass and say that the tables don't exist! It works as if the s...

Adwhirl is Not working in the UIViewController Class

If i implement it in application delegate class then it works fine. But in Viewcontroller class crash every time. i implemented try-catch then it will not crash. but not working. Thanks Manoj ...

ASP.NET remote debugging using Visual Studio 2008

Im having issues getting this to work, maybe its not even possible? I have a PUBLIC Server http://publicserver.com I want to debug using my laptop from my home (for instance) I run msvsmon.exe on the public server, it starts up fine. On my local machine, i have my code open and in VS, i choose Debug->Attach for Qualifier i enter publi...

Visual studio debug console sometimes stays open and is impossible to close

Hey, EDIT #3 : Microsoft has released a 'fix' to this problem which is available here. I haven't had the time to test it, but I those who want to are welcome to leave their feedback here ! Sometimes when I run an application from Visual Studio and it crashes or I stop it using the stop button in the debug menu (Debug->Stop Debugging (S...

Debugging a Browser Redirect Loop

Hi all, I am using CakePHP with the Auth and ACL components. My page loads fine for non-registered users, but if I try to log in as a registered user I get an infinite redirect loop in the browser. I am sure that this is some sort of permissions problem, but the problem exists even for users who have permissions for everything. The o...

Why are assertEquals() parameters in the order (expected, actual) ?

Why do so many assertEquals() or similar function take the expected value as first parameter and the actual one as second ? This seems counter-intuitive to me, so is there a particular reason for this unusual order ? ...

How to debug Java code when using ANT script in Eclipse

Hi, I have a java class and I need to debug it (put breakpoints and continue using F6). I am using ANT script to init, build, deploy and run the code. I am using: <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,vars,source"> .......... </javac> But when I place the breakpoint in a line in my foo.j...

What do you call using print statements to debug code?

I'm just curious, but is there a name for the process using print statements to debug your code? An example in pseudocode x=3.2e39 print x y = function1(x) print y z = function2(y) print z w = function3(z) print w Executation: 3.2e39 3.2e36 NaN NaN reveals some bad math in function2. If there's no standard name, what do...

How can I see debug messages with Mono apps?

Hi, I have various Debug.WriteLine messages, I tried to see those messages using export MONO_DEBUG_LEVEL=debug, but I end up getting other irrelevant debug messages which was not outputted by my code. What should I do to see the debug messages? I'm using Linux :) Thanks. ...

What olive bullet on breakpoint means in SharpDevelop

Sometimes when I set a breakpoint and start debugging its color changes from red to olive: When it happens debugging doesn't stop at all - breakpoint is ignored. I want to know why this happens and how to avoid it in the future. Edit: It does not happens only when breakpoint is set on commented line of code: ...