2

I find myself debugging REST services lately and that involves visualising a lot of JSON.

When I have receive a JSON string and attempt to print it to the Immediate Window using the command ?jsonString,nq, the string is printed with a line break every 1026 characters.

This is annoying because it means every time I print, copy and paste the string I have to find/replace the CRLFs so that the string is valid JSON.

Is there a way to get devenv to print the string without these line breaks?
Is there some hidden setting for the "width" of the Immediate Window "terminal"?

Coxy
  • 8,844
  • 4
  • 39
  • 62

1 Answers1

2

AFAIK, this behaviour of wrapping at 1024 chars in the immediate window cannot be changed. You could try using the watch window or Shift+F9 after selecting the variable for an instant watch.

Ash
  • 5,786
  • 5
  • 22
  • 42
  • Thanks, the Watch/Locals/QuickWatch Window has the Text Visualiser popup which is not ideal (mouse clicks to bring up a modal dialog) but it does have a setting for long line wrap which can be unchecked. – Coxy Jul 08 '16 at 02:37
  • Yes, it's harder to work with but being at the whim of Microsoft's design decisions, we beggars can't be choosers : ) . – Ash Jul 08 '16 at 02:57