I’m not a professional tester, but I am an expert at making mistakes. I take risks. I try everything. I gravitate to “corner cases” and odd circumstances. That makes me a great amateur tester and, due to a lifetime of experience with breaking things, a pretty good debugger. But, at the Omaha PowerShell User Group meeting in August […]
Tag: Debugging
PowerShell Studio 2015: Enhancements for Debugging
In the last service release v4.2.86 we introduced some new enhancements to help improve your debugging experience. New Variables Panel Context Menu We added a new context menu to the Variables Panel that allows you to: Add To Watch – Adds the selected variable to the Watch Panel. Query in Debug Console – Runs […]
Debugging Modules in PowerShell Studio 2012
PowerShell Studio now makes it easier to debug and run your module projects. You now have the ability to execute and debug a module project directly from the IDE (Supported in PowerShell Studio 2012 v3.1.9 and up). Debugging a module project: When debugging (F4) or running (Ctrl + F4) a module project for the first […]
Debugging multiple scripts with PrimalScript 2012
Debugging a simple script with a few lines is not a big deal, hit debug and step through it. Almost any PowerShell related editor can do that today. But what if you need to debug a complete system of scripts interacting with one another? This new service build of PrimalScript 2012 introduces the ability to […]
Debugging PowerShell on Windows 8
Yes you can! Just make sure you run PowerShell ONCE before installing PrimalScript. Some of the PowerShell assemblies are not available in the GAC before it runs at least once.
Fun with Debug Messages
In my script and function development, I often add the line $DebugPreference=”SilentlyContinue” to the beginning of my code. Throughout the script I add lines using Write-Debug that tell me what the script is doing or the value of a particular variable. This has been very helpful. When I want to see the debug messages, I set $DebugPreference to “Continue” and voila!. In PrimalScript all the messages are written to the debug panel. But I wanted more .
PowerShell and the Heisenberg Principle
While developing the PowerShell debugger for PrimalScript 2007 we tested with a large number of scripts. Pretty much anything we could lay our hands on. The following script was one of them. function AreArraysEqual($a1, $a2) { $enum1 = $a1.GetEnumerator() $enum2 = $a2.GetEnumerator() #"$enum1" while ($enum1.MoveNext() -and $enum2.MoveNext()) { if ($enum1.Current […]