vscode-nushell-lang icon indicating copy to clipboard operation
vscode-nushell-lang copied to clipboard

Debugger (Launch debugger and attached debugger)

Open trymeouteh opened this issue 1 year ago • 3 comments

Please add the ability to debug Nushell scripts within VSCode. Would help when making large scripts to have a step debugger and be able to see the call stack, variable values, etc.

Would be great to have both an launch debugger option and an attached debugger option.

trymeouteh avatar Jul 26 '24 02:07 trymeouteh

We don't have a debugger at all to start with, so this is something we'll have to work on. But I think there is interest in developing something like this with the Debug Adapter Protocol so that it can work with multiple editors.

devyn avatar Jul 26 '24 04:07 devyn

You may want to check out the debug profile command, it is able to show you the result of elements executed within a pipeline and the exact execution steps taken, at least. Since it outputs a table it's fairly easy to analyze it however you want with the standard Nushell data manipulation commands.

devyn avatar Jul 26 '24 04:07 devyn

You can also find commands that help with debugging by running this command below.

help commands | where category == debug

fdncred avatar Jul 26 '24 11:07 fdncred