title: How do I debug a PowerShell background job?
body: <p>Jason Archer helped me solve <a href="https://stackoverflow.com/questions/5186384/can-ps1-scripts-run-as-background-jobs-themselves-execute-ps1-scripts">my last issue</a>, but in testing his solution I stumbled across the real problem. My server won't run chained background jobs correctly, but my laptops will. </p>
  
  <p>If I run the scripts in the previous problem on my laptops, they work perfectly. Script A starts Script B as a background job, and Script B calls Script C from within that job, and all output is received. If I run the exact same scripts on my server, Script A calls Script B, and Script B hangs indefinitely. If I run Script B directly, it executes perfectly on the server or the laptops. It's something about the job being backgrounded that's killing me. </p>
  
  <p>$PSVersionTable returns the same results on all computers, though obvious I had to use different installers on WinXP vs Win2003R2. </p>
  
  <p>What might be causing the difference in behaviour? </p>
  
  <p>Is there any way to troubleshoot what's going on in the background jobs? If I could see the command lines being received (I've logged what's being sent, but sometimes things drift), or what object is really hanging things, maybe it would help, but the debugger won't take me there. Perhaps there's a way to call the job within the ISE as if it were running in the background? </p>