Displaying data in Visual Studio debugger variable windows

How can you display details of a custom type in debugger windows without expanding type tree?

Let’s consider following sample:

private static void Main()
var Js = new[]{
new IDableText("John"),
new IDableText("Jack"),
new IDableText("Joe"),
new IDableText("Jackson")

foreach (var j in Js)
// ...

class IDableText
public IDableText(string name)
this.Text = name;
this.CreationTime = DateTime.Now;
this.Id = Guid.NewGuid();

public DateTime CreationTime { get; private set; }
public string Text { get; private set; }
public Guid Id { get; private set; }

This code will produce all too known debug variable window:


But, if you decorate class IDableText with a built-in attribute like this…

[DebuggerDisplay("Text={Text}  CreationTime={CreationTime}  Id={Id}")]

…you’ll get more readable result.



Riding a PDC wave…

Following a PDC2008 week the fine bits revealed are emerging on the Internet. Here come the Microsoft Pre-release Software Visual Studio 2010 and .NET Framework 4.0 Community Technology Preview (CTP) on Microsoft Downloads.

Next week it’s WinHEC 2008 and time to get dirty with drivers, debugging, devices and Windows 7 inside and out!



PDC2008 Sessions ONLINE!

If you were like me looking for a way to put your hands on PDC2008 session videos look no more!

Every session is recorded and accessible online: https://sessions.microsoftpdc.com/public/timeline.aspx

1. Click on a session you like…


2. Scroll down to session details


3. Select option you like:

Open Channel9 video session stream (1)

Download high quality WMV file (2)

Download PowerPoint session file (3)


At the moment (Thursday) you can download sessions for Monday and Tuesday, almost like you’re on a PDC, but with 2 days delay… smile_wink

If that isn’t cool, then I don’t know…



PDC 08 Keynotes

Ray Ozzie: It’s even harder to imagine a desk, a workplace without a PC… I mean: what would you do all day?


Keynote – Ray Ozzie, Amitabh Srivastava, Bob Muglia and David Thompson
Monday, October 27 8:30-10:30am

Keynote - Ray Ozzie, Steven Sinofsky, Scott Guthrie and David Treadwell
Tuesday, October 28 8:30-10:30am


It’s a wonderful world and it’s changing by the minute!


Microsoft Mice - Say Goodbye to Laser

Say Goodbye to Laser

According to Microsoft’s hardware web site, in a couple of days we can expect some new “groundbreaking” technology for tracking mouse movements and new devices that employ that technology. The real question is: do we really need one?

First optical mice appeared in 1980’s and used either infrared or visible light LEDs and required special surfaces with printed lines or dot grids to operate. Modern optical mice work on similar principle, but do not require special surfaces and can operate on almost anything from plain white paper to your bed covering. Of course, experiences were not as perfect as manufacturers expected (and promised on numerous occasions) which led to frustrated users. How many times have you tried to show something to your colleague and found yourself waving with the mouse all over the table just to make it move an inch?

Now Microsoft is promising new technology that should alleviate us from burdens of finding just the right surface to run your mouse on. If the add from Microsoft’s web site is to be trusted, these new devices will work on curved chair tops, rugged surfaces like carpets or outdoor tables, glossy and reflective like kitchen table tops, well the time will tell…


My personal complaint was never that mice don’t work on some surface, but rather their response and precision. Being a laptop user from almost a decade (and a Microsoft Mouse fan even longer), I was always looking for a wireless solutions.

First wireless devices used big ugly receivers connected through even more unpractical 30 feet long USB cable, which were everything but portable. My first truly mobile mouse was Microsoft IntelliMouse Explorer for Bluetooth which was everything I was looking for at the time: sized like normal desktop mouse, had long battery life, ergonomically shaped and Bluetooth connectable.


The drawbacks were slow responsiveness, occasional disconnects (some kind of sleep mode), slow reconnects, and no power switch (which led to battery discharging while being moved in bag).

Nowadays I’m using Wireless Laser Mouse 8000 (in laptop bag when traveling) and Wireless Laser Mouse 7000 (office desktop). Both use invisible 850nm laser LED (Microsoft’s High Definition Laser Technology), both have power switch, but the first one uses Bluetooth and the later RF wireless connection. Although both are exceptional devices they still perform occasional disconnects and have cursor movement slowdowns. But that’s not the worst of things. Each is tuned differently (speed and mouse scroll) and whenever I use the other one on my laptop I have to configure its speed in Mouse configuration Control Panel. Now someone will say this is like comparing apples and pears, but this is something that really bothers me…

image image


Will this “new” technology from Microsoft Hardware make any difference will see next week, until then this was my 5¢




Internet Explorer 8 - in Beta 2 NOW! What do you like the most about it?


Considering that most of MS's "hot" products were RTMed last year (and some this, like SQL 2008) the question was how would Microsoft fill this year's void... Well, here comes the IE8! Most certainly it will be the hottest product coming from Microsoft’s workshops and currently you can download Beta 2 version of IE2, which I earnestly recommend.

Knowing the history with Microsoft's web browsers, I was, at first, a bit skeptical, but now... Well, read on.

Installation on my Vista x64 was a breeze. Immediately after starting you're introduced to familiar interface like that of IE7, but just a little bit better. It's not so roundy and bulky as IE7, but rather sharp and all about business. It was nice to see numerous, almost invisible, UI improvements that make using this application so more enjoyable.

On the other hand, no one actually uses web browsers because they are "smooth", "nice" or "enjoyable", but because they work, they are fast, they don't complain...

There are numerous new features built in new IE about which you can read about around the web (like Arlindo's blog), and with which I will not bother you. I'll just mention that I like its speed (yes, it's actually faster), its assisted search capabilities, IE7 compatibility button and new built-in Developer Tools.

But the thing I like the most is IE8 crashing. Yes, you've read that right, I like how IE8 crashes!

Let's be reasonable... Web browsers crash, they'll still crash next year, and they'll crash in the future... The problem doesn't lie only with browser or it's implementation but also with web page programming. There are most probably several hundred potential reasons why browser crashed in any given session and it's virtually impossible to predict every one of them.

One of most horrific situations I encountered was IE7 crashing while having 8 or more different web pages open in IE7 tabs. You can imagine how painful it was to recover most of those to resume what I was searching for before.

So Microsoft built a "crash recovery" feature in IE8 (available in Beta 2). Now when a crash occurs IE8 won't close the browser but rather restart just the tab in which crash occurred. Even better, IE8 will leave the restarted tab in the position where it was when the crash occurred. Fantastic, is all I can say! Not worthy


How does that actually work? Instead of one process IE8 starts new "iexplore.exe" process for every tab you open and one extra for IE8 window. So if you have 2 tabs open, you'll have 3 iexplore.exe processes running. Even if your computer crashes during web browsing, next time you start IE8, it will know which pages you had open and offer to reopen them. Marvelous!

One thing is certain: I'm never going back to IE7!



KulenDayz 2008

If you weren't there, you should kick yourself! smile_tongue

A weekend event organized by the Community for the Community, located in the middle of nowhere, a day packed full with great sessions, held by great speakers coming from all over the Europe and farther and an all night party which would probably still go on if the Sun hadn’t come up… smile_regular

For more information visit official web page http://kulendayz.mscommunity.net/ and seek for other blogs like this one (Arlindo's Blog)...

Until the next KulenDayz enjoy in photos and continue to kick yourself...





Technorati Tags: ,,

Uninstalling Adobe Stock Photos

For the first time (long after installation) I opened Adobe Stock Photos CS3. First message after starting was "Services offered though Stock Photos are not available any more. Please download uninstaller to remove Adobe Stock Photos from CS3 Suite."

Well that happens and link to uninstaller is a commendable “feature”, but I only wish that they’ve tested this uninstaller for computers when region settings are not “English”... smile_regular

Story in pictures:

Start uninstall  During uninstall


U kojoj državi je vaša mrežna kartica?

Ovaj vikend sam reinstalirao jedan stariji laptop i iz znatiželje prvi puta sam instalirao "Paket hrvatskog sučelja za Windows® XP".

Imao sam prilike vidjeti ovu pogrešku još prije dvije godine, ali me totalno fasciniralo da nitko nije našao vremena ili resursa u tom proteklom vremenu da istu popravi. Stoga ponovno pišem o ovom glupom i smiješnom previdu u nadi da će netko ipak naći vremena, prije nego se support za Windows XP u potpunosti ugasi, to popraviti (Windows Update?).


Uz Radnu i Neradnu državu sam Task Manager, kao što možemo vidjeti na slici, je dobio još jedan fantastičan prijevod: "prilagodnik". smile_teeth

Poprilično sam siguran je "mrežni adapter" ispravan naziv na hrvatskom jeziku i puno preciziniji od "prilagodnika", ali k'o da se mene pita...



Visto, očisti se!

Ako ste na Vistu instalirali SP1, zadovoljni ste ponašanjem operativnog sustava, ne planirate više nikada deinstalirati SP1, onda pokrenite VSP1CLN programčić...


...koji će vam obisati sve RTM datoteke koje su izmijenjene sa SP1-om i time efektivno onemogućiti uninstall.

Ja sam pokretanjem ovog programčića dobio 1,6GB slobodnijeg prostora na disku. Nije preznačajno, ali je 1,6GB manje za defragmenter i 1,6GB više prostora za filmove! smile_wink


Više na stranici: http://technet2.microsoft.com/WindowsVista/en/library/0505991e-49c2-494b-8703-257a14c3d4721033.mspx?mfr=true 



Windows Forms/WPF i komandno-linijska aplikacija u jednom...?

Nedavno sam na jednom projektu imao zathjev da se aplikacija može pokrenuti u sučelju u kojem korisnik interaktivno može postavljati parametre procesiranja, te da se ta ista aplikacija može pokrenuti u komandnoj liniji gdje se svi parametri procesiranja postavljaju kao komandno-linijski argumenti.

Iako na prvu problem ne zvuči komplicirano ugrađena podrška za takav scenarij ne postoji u .NET Frameworku. Ukoliko za projekt Windows aplikacije Output type promijenimo u Console Application...



...rezultat neće biti ono što bi se svakome svidjelo:


Srećom Win32 API ima metode kojima se to može riještiti.

private const uint ATTACH_PARENT_PROCESS = 0x0ffffffff;

public static extern bool AllocConsole();

public static bool AttachConsole()
return AttachConsole(ATTACH_PARENT_PROCESS);

public static extern bool AttachConsole(uint dwProcessId);

public static extern bool FreeConsole();

Korištenjem navedenih P/Invoke metoda možemo otvoriti samo konzolu ili samo Windows aplikaciju kao u slijedećem kodu:

static void Main(string[] args)
if (args.Length > 0 && args[0].Equals("/cmd"))
if (!AttachConsole())

// do Console.* work...

Application.Run(new Form1());

AttachConsole će se pokušati spojiti na postojeću konzolu (ako je aplikacija pokrenuta iz komandne linije), a ako ne uspije (AttachConsole vrati false) pozvat ćemo AllocConsole što će kreirati novu konzolu i u njoj izvršiti aplikaciju. FreeConsole na kraju pozivamo kako bismo oslobodili lock na trenutnu konzolu.



Microsoft Photosynth

U posljednjoj epizodi CSI New Yorka demonstrirana je Microsoftova Photosynth tehnologija. Za one koje nisu upoznati radi se o aplikaciji/tehnologiji koja iz niza prividno nepovezanih slika neke okoline može izgenerirati virtualnu 3D scenu kroz koju se može "prošetati" u svim smjerovima. Dakako, mogućnosti približavanja objektima (zoom) ovisi i o kvaliteti samih fotografija.

Više informacija i demo tehnologije možete pogledati na adresi: http://labs.live.com/photosynth/


U jednoj sceni Flack ispituje sumnjivca i pokazuje mu slike generiranje Photsynthom:

- Here you are... Heading into the science lab with him at 10:20.
- How do you know that's me?
- It's Microsoft's world, kid... I'm just living in it.


Cijelu epizodu možete pogledati na CBS-ovim stranicama: CBS - CSI:NY Video

CSI: NY nakon ove i ranije demonstracije Cisco TelePresence-a definitivno postaje naj-techy serija bez nepotrebnog lupetanja gluposti ili sci-fi overkilla, kao CSI Miami i njihovo korištenje "modernih tehnologija" kako smo mogli vidjeti ovdje... smile_wink



WinDays 8

header Volite tehnologiju? Volite naprednu tehnologiju? Hands-On-Labovi su vam bezveze?

Navratite na moje predavanje Automatizacija i testiranje korisničkog sučelja... Sat vremena čiste pervezije sa, na, oko, u, i o WPFu...


Kako automatizirati Windows kontrole, kako napraviti nešto što možda niste ni znali kako napraviti na Windowsima, kako namjerno slomiti aplikaciju (u WPFu), zašto business računala trebaju imati najnoviju i najjaču grafičku karticu...

Dođite i saznat ćete...