Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 2 ISE,未在导入模块中的断点上停止_Powershell_Module_Powershell Ise - Fatal编程技术网

Powershell 2 ISE,未在导入模块中的断点上停止

Powershell 2 ISE,未在导入模块中的断点上停止,powershell,module,powershell-ise,Powershell,Module,Powershell Ise,当我们在导入的模块中设置断点时,调试器会忽略该断点。还有人见过这种行为吗? 这让我抓狂,我们广泛使用PowerShell模块。 真正奇怪的是,如果运行get-psbreakpoint,我可以看到断点 PS H:\Projects\Powershell> get-psbreakpoint | format-list -force Id : 0 Script : H:\projects\Powershell\Shared\SFTP\SFTP.psm1 Line :

当我们在导入的模块中设置断点时,调试器会忽略该断点。还有人见过这种行为吗?
这让我抓狂,我们广泛使用PowerShell模块。
真正奇怪的是,如果运行get-psbreakpoint,我可以看到断点

PS H:\Projects\Powershell> get-psbreakpoint | format-list -force


Id       : 0
Script   : H:\projects\Powershell\Shared\SFTP\SFTP.psm1
Line     : 25
Column   : 0
Enabled  : True
HitCount : 0
Action   : 

Id       : 1
Script   : H:\projects\Powershell\Trading\CPPIB\scripts\CppibBorrowReturns.ps1
Line     : 12
Column   : 0
Enabled  : True
HitCount : 1
Action   : 

编辑:如果我删除psd1(清单文件),似乎可以工作。

调试模块可能很困难。我能够做到这一点的一种方法是加载模块和调用正在调试的函数的代码。在调用模块中函数的代码中,放置断点。然后,当它调用模块中的函数时,介入它。一旦它进入模块,您应该能够再次点击F5以达到模块中的断点


很抱歉,如果这不是应该的那么清楚的话,那么我仍然在为周一的日光节约而苦恼。

这就是我最终得到的解决方案。我希望在Windows 8/Server 2012中效果更好。。。