Starting the debugging service on an external terminal with both the -EnableConsoleRepl
and the -DebugServiceOnly
flags and then attaching to it via nvim-dap using the following adapter:
dap.adapters.powershell = { type = "pipe", pipe = "<some-harcoded-temp-path-on-unix-or-named-pipe-on-windows>", }
and the following config:
dap.configurations.ps1 = { { name = "PowerShell: Launch Current File", type = "powershell", request = "launch", script = "${file}", }, }
Results in the debugger session correctly starting and the Integrated Terminal being displayed, but the current script isn't launched right away.
If then the enter key is pressed while inside of the Integrated Terminal, something like the following is shown:
PS /home/luis>
PS /home/luis> . '/home/luis/neovim/a.ps1'
The first line is the empty line where the user pressed the enter key. The second line is the script launched by Powershell Editor Services (only launched after the user issued an empty command).
The first breakpoint is hit inside of the script
The debugger is told to continue until the next breakpoint, nothing happens. The user has to, once again, issue an empty command before the debugger stops before the next breakpoint.
Notes:
eval
request. The request isn't processed until an empty command is issued by the user.Name Value ---- ----- PSVersion 7.4.1 PSEdition Core GitCommitId 7.4.1 OS Ubuntu 22.04.4 LTS Platform Unix PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0Editor Version
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more infoPowerShell Editor Services Version
Major Minor Build Revision ----- ----- ----- -------- 3 20 1 0Steps to Reproduce
pwsh -NoProfile -File /path/to/powershell-editor-services/PowerShellEditorServices/Start-EditorServices.ps1 -HostName nvim -HostProfileId Neovim -HostVersion 1.0.0 -LogPath /path/to/powershell_es.log -LogLevel Normal -BundledModulesPath /path/to/powershell-editor-services -EnableConsoleRepl -SessionDetailsPath /path/to/powershell_es.session.json -DebugServiceOnly <some-harcoded-temp-path-on-unix-or-named-pipe-on-windows>
nvim example.ps1
(example.ps1
must contain any powershell code like some write-host
commands) using the config described in the summary (I can provide a minimal.lua
config if needed):lua require'dap'.toggle_breakpoint()
:lua require'dap'.continue()
enter
key on the Integrated Terminal (issuing an empty command)No response
LogsPowerShellEditorServices-100695.log
StartEditorServices-100695.log
freddiehaddad, ForNeVeR, Fantoom and bryan-hoang
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4