Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Help with Callstack

$
0
0

Take the following simplified code,

function test2 { Write-Output -InputObject ([int]5) } function test1 { Write-Host "the results are: $(test2)" } 

When using Get-PSCallStack from within test2, I can see that test1 is the function that called it, but I can’t directly see that it was called as part of Write-Host. I know I can see a string representation of the line of code that was being run through debugging, but that would require more parsing than I’d like to find out it came from within Write-Host. Is there an easier way to find that particular piece of information by pulling apart the callstack?

submitted by /u/AudaxDreik
[link] [comments]

The post Help with Callstack appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images