How do I detect in my program that it's being run under a debugger? I am aware that this seems to indicate that I try to do something I shouldn't, and that is too messy. I think it is an interesting question tho. Specifically, is there a way to do it in a POSIX environment? For example using sigaction (2) to detect that some handler ...
Hi,
I've noticed that the native C++ application I'm working on has quite a large memory footprint (20MB) even before it enters any of my code.
(I'm referring to the "private bytes" measure in Windows, which as I understand it is the most useful metric).
I've placed a break point on the first line of the "main()" function and sure en...
"Programming Pearls" in the column 2 ("AHA! Algorithm") talks about how binary search aids in various processes like sorting, tree traversals. But it mentions that binary seach can be used in "program debugging". Can somebody please explain how this is done?
...
Hello,
In Adobe Director, there is a watch window that updates while my application runs. For example, if I have a game application and am watching an instance of a ball object, I can see all of its values (velocity, altitude, state variables, etc) updating in real-time as the application is running. I can also add any other object to...
I find programming in PHP quite frustrating. Quite often I will try and run the script and just get a blank screen back. No error message, just empty screen. The cause might have been a simple syntax error (wrong bracket, missing semicolon), or a failed function call, or something else entirely.
It is very difficult to figure out what w...
I'm running a Pentium 4 2.8 ghz with 1.7g gigs of ram.
...
I'm working on a board game algorithm where a large tree is traversed using recursion, however, it's not behaving as expected. How do I handle this and what are you experiences with these situations?
To make things worse, it's using alpha-beta pruning which means entire parts of the tree are never visited, as well that it simply stops r...
Hi,
I have a bunch of generic code that is used a lot, which i'd like to poke into in order to deal with a bug in a certain specific case.
So I'd like to break on a set of breakpoints only if some other breakpoint has been hit. Is there a way to do this in Visual 2005? I'm using C++ code.
Thanks!
...
Hello,
Quick question on LINQ to SQL generated queries output.
I am in a ASP.NET MVC project, Visual Studio 2008, and I am trying what's suggested in MSDN documentation:
MyDataContext _dc = new MyDataContext();
_dc.Log = Console.Out;
But nothing is being shown on "Output" window (CTRL+Alt+O).
Is there is something else I need to co...
Similar to this problem here:
Old Question about C# debugging
I'm trying to debug a library that's used in multiple projects and is compiled using Intel's C++ v 11 compiler (ie, not the standard compiler) in Visual Studio 2008. The current platform I'm using to debug is a C# program that calls the C++ method through a p/invoke.
Is th...
I have some VB6 code that instantiates a class which handles events that are being raised from a VB.NET component. The VB6 is pretty straightforward:
private m_eventHandler as new Collection
...
public sub InitSomething()
dim handler as EventHandler
set handler = new EventHandler
m_eventHandler.Add handler
...
m_engine.Star...
I have some ASPX files deployed in test machine which has IIS7 and Visual Studio 2008.
Now I attached to the w3wp process with VS2008 and open one ASPX file. The ASP file has some inline code like
<% DoSomthing() %>
I move the cursor to that line and press F9, but the status bar shows "This is not a valid location for a breakpoint". ...
Hey everyone,
I'm using Firebug 1.3.3 with Firefox 3.0.10, and I wanted to know if it was possible to enable the Console, Script, and Net consoles all the time.
It used to be such that it was always on. Now, if its disabled I have to manually turn on each tool and send requests again to see whats going on.
Is there any way to do this...
Hi all,
I've deployed my application on a new machine, I've installed the Compact Edition Runtime and got a weird exception.
I coudln't locate any info about that on the web furthermore, ways to solve it.
Maybe you've encountered it?
This is the exception:
Type : System.Data.SqlServerCe.SqlCeException, System.Data.SqlServerCe, Vers...
I have a client/server application using the .Net 2.0 Framework. I'm using Visual Studio 2008 to build and manage code.
When I run either a Debug or Release version of the application simply by starting the .exe, I get an insert statement on the database that tries to insert a "0" for the foreign key of a table, triggering an error beca...
How can I freeze Javascript in firebug so that i can inspect the changes made by it in the html? If for example i have a jQuery rollover effect and i want to inspect the html code in that point in time.
I believe Dreamweaver CS4 has this feature titled freeze javascript and live code. Is there a free equivalent either in Firebug or anot...
It's with great hesitation that I pose this question because I know that whenever you think you've found a bug in something like the .NET framework it's probably just you doing something wrong. Never the less, I really can't figure out what has caused my current situation.
I'm building a ray tracer in C# and in a special case the return...
How does setting breakpoints in Java work?
Is it just based on the source file name and line number? Does the class or method name also figure in?
If I have an old version of the source in my debugger and set a breakpoint, the cursor is off when I step through. How far off can it be? Can it go into the wrong method (or even the wrong c...
So, as soon as I hit a breakpoint in some thread, is it possible to halt other threads until I continue?
...
I'm trying to debug a large ASP.NET application.
I set a breakpoint on the first line in Page_Load in Default.aspx.cs.
When I start the application, my breakpoint briefly turns into a red round outline with an exclamation in it, then turns back into a regular breakpoint, then the application starts without ever stopping at my breakpoin...