0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Powershell ISEでのデバッグでブレークポイントで止めても、$argsの中身は取れないよって話

Posted at

題名の通り、Powershell ISEで引数指定してps1ファイルをデバッグ実行した場合に$argsの内容は取れない

powershellファイルにAAAAという引数を渡して
ブレークポイントで止めて、その地点で$argsを取得するも取れず
powershell.png

かといって、$args自体は空はない
powershell2.png

対処方法

ps1ファイル内で、$tmp = $argsといった形式で$argsの内容を別の変数に移し替えれば内容が取得できる

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?