问题
When debugging, is it possible to watch return-values in VSC? and how? I can't find an option to watch auto-variables like Visual Studio has
回答1:
Visual Studio Code recently supported this - the returned value can be found under "Local":
回答2:
See https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_44.md#reference-returnvalue-in-watches-and-debug-console JAVASCRIPT
With v1.44:
Reference $returnValue in Watches and Debug Console
When it's availble in the callstack, you can now reference the function's
$returnValue
in the debug console and watch expressions.
So it can be used in the Watch view and the debug console.
来源:https://stackoverflow.com/questions/47200659/watching-return-values-in-visual-studio-code