You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched all issues to ensure it has not already been reported.
Summary
I have seen video's of vcode/powershell where when attaching to a host powershell process (running any script) using an attach configuration that script stops where it currently was executing.
This does not happen in the current powershell version (7.4.6). It also does not happen when doing the attach manually using enter-psHostProcess followed by debug-runspace. But it works when using debug-runspace -breakall.
I have seen that breakAll is new sinds powershell 7.2. I expect that in the powershell extension when using an attach configuration the old version "debug-runspace" is used and not the new version "debug-runspace -breakall".
Proposed Design
Can this be changed back to it was before powershell 7.2 (or configured in the launch configuration)?
The text was updated successfully, but these errors were encountered:
The external debugging, especially around breakpoints, is very finicky at the moment. I'm going to peg this as dependent on #4065 and once that breakpointing sync problem is solved we can look more into the remothing issue there.
I have created a temporary solution . It involves 2 launch configurations. A powershell function called D03_FacilitateDebug and a procedure explaining how to use them.
Because that all takes quit some lines I will add them as an attachment solution to debug.txt
Forgot to meantion that D03_FacilitateDebug can not directly used inside the job. First you have to convert it to a string and the use that string to dynamicaly define the function (with the same or as done in the next example with a new name and then call that function. So the statements immediately befor the start-treadjob and the first statements inside the job are:
he following statements at the start of the thread job:
[String]$f_FunctionNoHeader_Str=${function:D03_FacilitateDebug}.toString()
[ThreadJob.ThreadJob]$Job1 = start-threadjob -ScriptBlock {
write-output "JOB: FIRST LINE"
# bring the functions definition (as string) to this scope
# define the function with a new name in this scope
${function:J03_FacilitateDebug}=$using:f_FunctionNoHeader_Str
J03_FacilitateDebug -p_TypeOfScript "JOB"
Prerequisites
Summary
I have seen video's of vcode/powershell where when attaching to a host powershell process (running any script) using an attach configuration that script stops where it currently was executing.
This does not happen in the current powershell version (7.4.6). It also does not happen when doing the attach manually using enter-psHostProcess followed by debug-runspace. But it works when using debug-runspace -breakall.
I have seen that breakAll is new sinds powershell 7.2. I expect that in the powershell extension when using an attach configuration the old version "debug-runspace" is used and not the new version "debug-runspace -breakall".
Proposed Design
Can this be changed back to it was before powershell 7.2 (or configured in the launch configuration)?
The text was updated successfully, but these errors were encountered: