background preloader

Development

Facebook Twitter

VS2010 : Unable to Hit Breakpoints in Managed Code - Developer Support Languages - VC++, C# and VB.NET. In Visual Studio 2010, if you are debugging a native executable which in turn loads a managed DLL built against a version of the framework previous to version 4, you may find that breakpoints which are set in the managed code are not hit. The breakpoints are displayed correctly, you just never hit them when executing the code in question. If you attach to the process as opposed to running it from the debugger directly, you can hit the breakpoints if you change the code type to Managed (v2.0, v1.1, v1.0) when attaching. This can be done in the Attach to Process dialog (from the Debug, Attach to Process... menu). From there, choose the Select button and choose the Managed (v2.0, v1.1, v1.0) selection in the Select Code Type dialog.

This is an issue in the Visual Studio 2010 debugger. When loading the managed code, the debugger makes the wrong assumption about your managed code and loads the incorrect managed debugger. 10 Immutable Laws of Security. Here at the Microsoft Security Response Center, we investigate thousands of security reports every year. In some cases, we find that a report describes a bona fide security vulnerability resulting from an issue in one of our products; when this happens, we develop a corrective update as quickly as possible.

In other cases, the reported problems simply result from a mistake someone made in using the product, or our investigation finds a problem with the product that, while troublesome for users, does not expose them to a security vulnerability. But many fall in between. They are genuine security problems, but the problems don't result from product flaws. Over the years, we've developed a list of issues like these that we call the 10 Immutable Laws of Security. Don't hold your breath waiting for an update that will protect you from the issues we'll discuss below. The 10 Immutable Laws Law #2: If a bad guy can alter the operating system on your computer, it's not your computer anymore.

Coding Without Comments. If peppering your code with lots of comments is good, then having zillions of comments in your code must be great, right? Not quite. Excess is one way good comments go bad: '************************************************* ' Name: CopyString ' ' Purpose: This routine copies a string from the source ' string (source) to the target string (target). ' ' Algorithm: It gets the length of "source" and then copies each ' character, one at a time, into "target". It uses ' the loop index as an array index into both "source" ' and "target" and increments the loop/array index ' after each character is copied. ' ' Inputs: input The string to be copied ' ' Outputs: output The string to receive the copy of "input" ' ' Interface Assumptions: None ' ' Modification History: None ' ' Author: Dwight K.

I'm constantly running across comments from developers who don't seem to understand that the code already tells us how it works; we need the comments to tell us why it works. Let's add a comment. Top 10 Things That Annoy Programmers | Kevin William Pang. 10. Comments explaining “what”, but not “why” Introductory-level programming courses teach students to comment early and often. And while this may be a useful practice during programming infancy (when even the simplest line of code can be incomprehensible), many programmers never bother to shake the habit.

Do you have any idea what the code above does? Me neither. The problem is that while there are plenty of comments describing what the code is doing, there are none describing why it’s doing it. Much better! Write comments to help readers understand the code, not the syntax. 9. In general, programmers tend to be more akin to locomotives than ferraris; it may take us awhile to get started, but once we hit our stride we can get an impressive amount of work done. 8.

Wikipedia defines scope creep as “uncontrolled changes in a project’s scope”. Version 1: Show a map of the locationVersion 2: Show a 3D map of the locationVersion 3: Show a 3D map of the location that the user can fly through 7.