question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DBG] prompt not displayed when breakpoint hit unless Enter is pressed

See original GitHub issue

Issue Description

When I debug a PowerShell script and hit a breakpoint, the [DBG] prompt is not displayed immediately, but only after I hit Enter.

Here’s what the TERMINAL pane shows when I hit F5 and the first breakpoint is hit:

[… output from various profile scripts]
PS ~/powershell> s:\powershell\df.ps1

When I then hit Enter this changes to:

[… output from various profile scripts]
PS ~/powershell> s:\powershell\df.ps1
[DBG]: PS ~/powershell>

Expected Behaviour

When the breakpoint is hit, the [DBG] prompt should be displayed right away.

Actual Behaviour

The [DBG] prompt is not displayed unless Enter is pressed.

Attached Log

PSESlogs201904060747.zip s

System Details

System Details Output

### VSCode version: 1.33.0 0dd516dd412d42323fc3464531b1c715d51c4c1a x64

### VSCode extensions:
alefragnani.Bookmarks@10.4.2
anseki.vscode-color@0.4.5
austin.code-gnu-global@0.2.2
DougFinke.vscode-PSStackoverflow@0.0.2
Gruntfuggly.todo-tree@0.0.126
mechatroner.rainbow-csv@1.0.0
ms-vscode.cpptools@0.22.1
ms-vscode.powershell@1.12.0
ms-vscode.powershell-preview@2.0.1
msjsdiag.debugger-for-chrome@4.11.3
nobuhito.printcode@3.0.0
tht13.html-preview-vscode@0.2.5
VisualStudioExptTeam.vscodeintellicode@1.1.5
yzhang.markdown-all-in-one@2.2.0
zovorap.ab-html-formatter@0.0.2


### PSES version: 2.0.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      5.1.17763.316
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.316
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sba923commented, Nov 12, 2019

@TylerLeonhardt I hereby confirm that the fix worked on first try. Great job!

(I was scared at first by the “the extension has been updated to…” notification, fearing that the marketplace version might have overwritten the one from the VSIX…)

0reactions
TylerLeonhardtcommented, Nov 12, 2019

@sba923

Keep in mind this is a non-signed non-supported build and only for the sake of verifying that the problem is fixed.

PowerShell-insiders.vsix.zip

Here’s the vsix - do you know have to install it?

code --install-extension path/to/vsix

or in the GUI on the extensions page.

You may need to uninstall the PowerShell Preview extension in order to install this one as I have not rev’d the version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

about Debuggers - PowerShell | Microsoft Learn
When you reach a breakpoint, you enter the debugger environment. The command prompt changes so that it begins with "[DBG]:".
Read more >
Debugging with gdb - Stopping and Continuing
GDB normally ignores breakpoints when it resumes execution, until at least one instruction has been executed. If it did not do this, you...
Read more >
Problem running STRDBG - Google Groups
adding breakpoints and possibly other modules, the program has NOT yet begun executing. If you press F10 from the initial DSPMODSRC display, you...
Read more >
Adding program objects to a debug session for IBM i
When the Enter is pressed, program WEEKDAY2 is added to the debug session. Work with Module List System: SYSTEM01 Type options, press enter....
Read more >
BKP -- Breakpoint Debug - TAA Tools
This can be helpful if you have an error that does not appear until a particular ... Press F10 to access command entry...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found