Closed Willem-J-an closed 3 months ago
I wonder if this is related to what @dkattan was seeing (and fixing) in #2122.
Could be related indeed. If I pass the -EnableConsoleRepl switch everything crashes and burns so I'm not passing that flag. Would that cause suppression of output though pses dap?
Hi @andyleejordan,
Getting back to doing some powershell debugging; seems like some improvements were made on the above topics! I can see stdout and stderr output now:
[debug-adapter stdout] Using context;
[debug-adapter stderr] [31;1mNew-AzResourceGroupDeployment: [0mdeploy_workbooks.ps1:49[0m
[31;1m[0m[36;1mLine |[0m
[31;1m[0m[36;1m[36;1m 49 | [0m [36;1mNew-AzResourceGroupDeployment `[0m
[31;1m[0m[36;1m[36;1m[0m[36;1m[0m[36;1m | [31;1m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
Unfortunately, the colors codes are not interpreted on neovim dap client. Is there a way to disable the color codes, or would you have any other suggestions how to deal with this ?
Thanks!
For posterity: I found a way to make it work using Baleia:
{
"m00qek/baleia.nvim",
tag = "v1.4.0",
config = function()
local baleia = require("baleia").setup()
vim.api.nvim_create_user_command("Baleia", function()
baleia.automatically(vim.fn.bufnr("%"))
end, {})
end,
}
Awesome news, thanks for sharing!!!
I think you could try:
$PSStyle.OutputRendering = [System.Management.Automation.OutputRendering]::PlainText;
to disable the color codes.
Prerequisites
Summary
I'm trying to integrate neovim DAP client with powershell. Recently support was added for named pipes in the client, so I got to work and got the integration working. I can launch the debugger, use breakpoints, step through, evaluate expressions, all good.
The only problem is: I don't seem to get the output stream of the actual script. No output when I simply run the script, and neither on the repl. The only way to get output is using the evaluating expressions or watching expressions. The integration is working to some extent; for example I can do $x = 'a' in the repl, and if I watch $x it will show 'a'. Is there any obvious reason from the perspective of my configuration that could explain this behaviour?
Proposed Design
No response